From: John L. <jla...@gm...> - 2012-10-16 04:22:17
|
On Mon, Oct 15, 2012 at 5:36 PM, klaas.holwerda <ng...@kl...> wrote: > Hi, > > Lately i need to outcomment > WXLUA_IMPLEMENT_BIND_STD > > and replace it by: > WXLUA_IMPLEMENT_BIND_WXLUA > WXLUA_IMPLEMENT_BIND_WXBASE > WXLUA_IMPLEMENT_BIND_WXCORE > > else i get errors like this: > > Linking CXX executable maskproc > CMakeFiles/maskproc.dir/maskprocmain.cpp.o: In function `MyApp::OnInit()': > maskprocmain.cpp:(.text+0x2330): undefined reference to `wxLuaBinding_wxadv_init()' > maskprocmain.cpp:(.text+0x2335): undefined reference to `wxLuaBinding_wxnet_init()' > collect2: ld returned 1 exit status > make[2]: *** [src/maskproc] Error 1 > make[1]: *** [src/CMakeFiles/maskproc.dir/all] Error 2 > make: *** [all] Error 2 Are you using this CMake generated file in your build? build/buildwxLua-config.cmake At the bottom is a macro() you can call to "SETUP_wxLua" to work at the directory level or you can simply add the wxLua_CXX_DEFINITIONS to your target. # --------------------------------------------------------------------------- # Add the compiler flags in the variable wxLua_CXX_DEFINITIONS to your target # or call the SETUP_wxLua() macro in any directory that has targets that use the # macros in modules/wxbind/include/wxbinddefs.h to initialize the wxWidgets bindings. set(wxLua_CXX_DEFINITIONS "-DwxLUA_USEBINDING_WXGL=1;-DwxLUA_USEBINDING_WXSTC=1;-DwxLUA_USEBINDING_WXXRC=1;-DwxLUA_USEBINDING_WXRICHTEXT=1;-DwxLUA_USEBINDING_WXHTML=1;-DwxLUA_USEBINDING_WXMEDIA=1;-DwxLUA_USEBINDING_WXAUI=1;-DwxLUA_USEBINDING_WXADV=1;-DwxLUA_USEBINDING_WXCORE=1;-DwxLUA_USEBINDING_WXXML=1;-DwxLUA_USEBINDING_WXNET=1;-DwxLUA_USEBINDING_WXBASE=1") macro(SETUP_wxLua) add_definitions(${wxLua_CXX_DEFINITIONS}) endmacro(SETUP_wxLua) Are you already doing this or when you do use them does it work then, it should, since the WXLUA_IMPLEMENT_BIND_STD should configure itself based on these #defines. Note that I may eventually switch this over to an #include file since it does seem like a lot of command-line args to gcc to me. Regards, John |