User forums > Using Code::Blocks

undefined reference with wxWidgets 3.1 wizard

(1/1)

cledou:
Hello.
I try to execute the wxWidget example from new->project->wxWidgets 3.1.x, but have an error:

--- Code: ---mingw32-g++.exe -LC:\wx311\lib\gcc_lib -o bin\Debug\test.exe  obj\Debug\testApp.o obj\Debug\testMain.o obj\Debug\resource.res -mthreads  -lwxmsw31ud -lwxpngd -lwxjpegd -lwxtiffd -lwxzlibd -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lcomctl32 -lwsock32 -lodbc32 -lshlwapi -lversion -mwindows
C:\wx311\lib\gcc_lib/libwxmsw31ud.a(monolib_statusbar.o): In function `ZNK11wxStatusBar12GetFieldRectEiR6wxRect':
C:\wx311\build\msw/../../src/msw/statusbar.cpp:455: undefined reference to `GetThemeBackgroundContentRect@24'
C:\wx311\lib\gcc_lib/libwxmsw31ud.a(monolib_statusbar.o): In function `ZN15wxUxThemeHandleC1EPK8wxWindowPKw':
C:\wx311\build\msw/../../include/wx/msw/uxtheme.h:234: undefined reference to `OpenThemeData@8'

--- End code ---
I have compiled my wx311 librairies with the gcc tdm 5.1 of codeblocks, with the switch MONOLITHIC=1
Does anybody have an idea about this problem ?

Edit: Sorry, the problem does not come from codeblocks, but from wxWidgets: the same project works perfectly with wx 3.1.0, but not with wxWidgets 3.1.1

Miguel Gimenez:
wxWidgets 3.1.1 removed automatic linking with uxtheme library, so you should add it to the linker settings near shlwapi or wsock32.

cledou:
Thanks, it was that. In fact, there is 2 librairies missing: -loleacc -lUxTheme

Navigation

[0] Message Index

Go to full version