Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wxWidgets dependency does not forward the modules kwarg #3123

Closed
FichteFoll opened this issue Feb 21, 2018 · 0 comments
Closed

wxWidgets dependency does not forward the modules kwarg #3123

FichteFoll opened this issue Feb 21, 2018 · 0 comments

Comments

@FichteFoll
Copy link

FichteFoll commented Feb 21, 2018

Trying to build a project that uses wxStyledTextCtrl, defined in the stc "module", does not work. It appears that the dependency does not honor or forward the modules kwargs.

The following test project shows the problem:

src/main.cpp

#include <wx/stc/stc.h>

int main(void) {
    wxStyledTextCtrl *canvas = new wxStyledTextCtrl();
    return 0;
}

meson.build

project('wx-test', ['c', 'cpp'], license : 'BSD-3-Clause',
        meson_version : '>=0.41.0',
        default_options : ['cpp_std=c++11', 'b_lto=true'])
deps = []
deps += dependency('wxWidgets', version : '>=3.0.0',
                   modules : ['std', 'stc', 'gl'])
src = files('src/main.cpp')
wx_test = executable('wx-test', src,
                     install : true,
                     dependencies : deps)

Build output (and command):

$ ninja -C builddir
ninja: Entering directory `builddir'
[1/2] Compiling C++ object 'wx-test@exe/src_main.cpp.o'.
../src/main.cpp: In function ‘int main()’:
../src/main.cpp:6:23: warning: unused variable ‘canvas’ [-Wunused-variable]
     wxStyledTextCtrl *canvas = new wxStyledTextCtrl();
                       ^~~~~~
[2/2] Linking target wx-test.
FAILED: wx-test
c++  -o wx-test 'wx-test@exe/src_main.cpp.o' -flto -Wl,--no-undefined -Wl,--as-needed -pthread -Wl,--start-group -lwx_gtk2u_xrc-3.0 -lwx_gtk2u_html-3.0 -lwx_gtk2u_qa-3.0 -lwx_gtk2u_adv-3.0 -lwx_gtk2u_core-3.0 -lwx_baseu_xml-3.0 -lwx_baseu_net-3.0 -lwx_baseu-3.0 -Wl,--end-group
/tmp/ccK9XIF8.ltrans0.ltrans.o: In function `wxStyledTextCtrl::wxStyledTextCtrl()':
<artificial>:(.text+0x87a): undefined reference to `vtable for wxStyledTextCtrl'
<artificial>:(.text+0x888): undefined reference to `vtable for wxStyledTextCtrl'
<artificial>:(.text+0x89a): undefined reference to `vtable for wxStyledTextCtrl'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
$ objdump -TC /usr/lib/libwx_gtk2u_stc-3.0.so.0.3.0  | grep '~wxStyledTextCtrl'
000000000002f170 g    DF .text  0000000000000019  WXU_3.0     wxStyledTextCtrl::~wxStyledTextCtrl()
000000000002ef30 g    DF .text  0000000000000212  WXU_3.0     wxStyledTextCtrl::~wxStyledTextCtrl()
000000000002ef30 g    DF .text  0000000000000212  WXU_3.0     wxStyledTextCtrl::~wxStyledTextCtrl()
000000000002f1a0 g    DF .text  0000000000000009  WXU_3.0     non-virtual thunk to wxStyledTextCtrl::~wxStyledTextCtrl()
000000000002f150 g    DF .text  000000000000000c  WXU_3.0     non-virtual thunk to wxStyledTextCtrl::~wxStyledTextCtrl()
000000000002f190 g    DF .text  0000000000000009  WXU_3.0     non-virtual thunk to wxStyledTextCtrl::~wxStyledTextCtrl()
000000000002f160 g    DF .text  000000000000000c  WXU_3.0     non-virtual thunk to wxStyledTextCtrl::~wxStyledTextCtrl()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant