title: How to correctly link wxWidget static libraries in Code::blocks?
body: <p>I am getting multiple(160+) undefined reference to `XXXXXXXXXX' when compiling a wxwidget project, 
  <a href="https://wiki.wxwidgets.org/Compiling_wxWidgets_with_MinGW#undefined_reference" rel="nofollow noreferrer">https://wiki.wxwidgets.org/Compiling_wxWidgets_with_MinGW#undefined_reference</a></p>
  
  <p>says </p>
  
  <blockquote>
    <p>your static libs MUST be given before shared libs.</p>
    
    <p>"-lwx_mswXXXXXX" and "XXXXXXXXXXX/libXXXXXX.a"</p>
  </blockquote>
  
  <p>i have no shared libraries in this project.</p>
  
  <p>i built the wxwidget 3.1.1 librarbies using this command: </p>
  
  <pre><code>mingw32-make SHELL=CMD.exe -j4 -f makefile.gcc BUILD=release UNICODE=1 SHARED=0
  </code></pre>
  
  <p>I am using mingw distro (nuwen ) gcc version 7.3.0 with codeblocks 17.02</p>
  
  <p>i setup the project with the wxwidget wizard in codeblocks.
  I've have tried the dummy source code before, its working when built with a shared library.</p>
  
  <p>i linked all libraries in project>build Options>linker setting:
  <a href="https://i.stack.imgur.com/M6UcU.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/M6UcU.jpg" alt="Build options"></a></p>
  
  <p>search directories are:
  compiler: C:\wxWidgets-3.1.1\lib\gcc_lib\mswu
  linker: C:\wxWidgets-3.1.1\lib\gcc_lib
  resource compiler : C:\wxWidgets-3.1.1\lib\gcc_lib\mswu</p>
  
  <p>here is the build log:</p>
  
  <pre><code>-------------- Build: Release in test (compiler: GNU GCC Compiler)---------------
  
  g++.exe -LC:\wxWidgets-3.1.1\lib\gcc_lib -o bin\Release\test.exe  obj\Release\testApp.o obj\Release\testMain.o obj\Release\resource.res -s -static-libstdc++ -static-libgcc -static -mthreads  -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lcomctl32 -lwsock32 -lodbc32 -lshlwapi -lversion -lwxmsw31u_richtext -lwxmsw31u_xrc -lwxmsw31u_aui -lwxmsw31u_media -lwxbase31u_net -lwxmsw31u_gl -lwxbase31u_xml -lwxmsw31u_adv -lwxmsw31u_html -lwxmsw31u_core -lwxbase31u -lwxpng -lwxjpeg -lwxtiff -lwxzlib -lwxregexu -lwxexpat -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lcomctl32 -lwsock32 -lodbc32 -lshlwapi -lversion -mwindows
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_window.o):window.cpp:(.text+0xc1e1): undefined reference to `__imp_OpenThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_window.o):window.cpp:(.text+0xc205): undefined reference to `__imp_GetThemeColor'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_window.o):window.cpp:(.text+0xc266): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_window.o):window.cpp:(.text+0xc7c1): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_window.o):window.cpp:(.text+0xc874): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_window.o):window.cpp:(.text+0x10459): undefined reference to `__imp_OpenThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_window.o):window.cpp:(.text+0x104bd): undefined reference to `__imp_GetThemeBackgroundContentRect'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_window.o):window.cpp:(.text+0x10520): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_window.o):window.cpp:(.text+0x10c7a): undefined reference to `__imp_OpenThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_window.o):window.cpp:(.text+0x10cfe): undefined reference to `__imp_GetThemeBackgroundContentRect'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_window.o):window.cpp:(.text+0x10d53): undefined reference to `__imp_IsThemeBackgroundPartiallyTransparent'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_window.o):window.cpp:(.text+0x10d6e): undefined reference to `__imp_DrawThemeParentBackground'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_window.o):window.cpp:(.text+0x10da5): undefined reference to `__imp_DrawThemeBackground'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_window.o):window.cpp:(.text+0x10dd2): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_window.o):window.cpp:(.text+0x117d7): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_window.o):window.cpp:(.text+0x118ba): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_msw_anybutton.o):anybutton.cpp:(.text+0x8c0): undefined reference to `__imp_OpenThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_msw_anybutton.o):anybutton.cpp:(.text+0x8f0): undefined reference to `__imp_GetThemeMargins'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_msw_anybutton.o):anybutton.cpp:(.text+0x930): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_msw_anybutton.o):anybutton.cpp:(.text+0x946): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_msw_anybutton.o):anybutton.cpp:(.text+0x3fd3): undefined reference to `__imp_OpenThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_msw_anybutton.o):anybutton.cpp:(.text+0x4008): undefined reference to `__imp_IsThemeBackgroundPartiallyTransparent'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_msw_anybutton.o):anybutton.cpp:(.text+0x402b): undefined reference to `__imp_DrawThemeParentBackground'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_msw_anybutton.o):anybutton.cpp:(.text+0x405a): undefined reference to `__imp_DrawThemeBackground'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_msw_anybutton.o):anybutton.cpp:(.text+0x4089): undefined reference to `__imp_GetThemeMargins'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_msw_anybutton.o):anybutton.cpp:(.text+0x40d7): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_msw_anybutton.o):anybutton.cpp:(.text+0x663f): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_menuitem.o):menuitem.cpp:(.text+0x51e): undefined reference to `__imp_OpenThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_menuitem.o):menuitem.cpp:(.text+0x539): undefined reference to `__imp_GetThemeSysColor'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_menuitem.o):menuitem.cpp:(.text+0x571): undefined reference to `__imp_GetThemeSysColor'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_menuitem.o):menuitem.cpp:(.text+0x5b3): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_menuitem.o):menuitem.cpp:(.text+0x658): undefined reference to `__imp_GetThemeSysColor'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_menuitem.o):menuitem.cpp:(.text+0x6d5): undefined reference to `__imp_GetThemeSysColor'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_menuitem.o):menuitem.cpp:(.text+0x757): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_menuitem.o):menuitem.cpp:(.text+0x1ff7): undefined reference to `__imp_OpenThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_menuitem.o):menuitem.cpp:(.text+0x2025): undefined reference to `__imp_GetThemeMargins'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_menuitem.o):menuitem.cpp:(.text+0x20ed): undefined reference to `__imp_GetThemePartSize'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_menuitem.o):menuitem.cpp:(.text+0x2174): undefined reference to `__imp_GetThemeInt'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_menuitem.o):menuitem.cpp:(.text+0x2199): undefined reference to `__imp_GetThemeSysFont'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_menuitem.o):menuitem.cpp:(.text+0x22d1): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_menuitem.o):menuitem.cpp:(.text+0x2ef8): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_menuitem.o):menuitem.cpp:(.text+0x37a3): undefined reference to `__imp_OpenThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_menuitem.o):menuitem.cpp:(.text+0x380e): undefined reference to `__imp_DrawThemeBackground'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_menuitem.o):menuitem.cpp:(.text+0x38a5): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_menuitem.o):menuitem.cpp:(.text+0x3bc6): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_menuitem.o):menuitem.cpp:(.text+0x4768): undefined reference to `__imp_OpenThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_menuitem.o):menuitem.cpp:(.text+0x477c): undefined reference to `__imp_IsThemeBackgroundPartiallyTransparent'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_menuitem.o):menuitem.cpp:(.text+0x478b): undefined reference to `__imp_DrawThemeBackground'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_menuitem.o):menuitem.cpp:(.text+0x47fa): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_menuitem.o):menuitem.cpp:(.text+0x4b7a): undefined reference to `__imp_DrawThemeBackground'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_menuitem.o):menuitem.cpp:(.text+0x4d37): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_menuitem.o):menuitem.cpp:(.text+0x505e): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_msw_statbox.o):statbox.cpp:(.text+0x2d60): undefined reference to `__imp_OpenThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_msw_statbox.o):statbox.cpp:(.text+0x2d91): undefined reference to `__imp_GetThemeFont'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_msw_statbox.o):statbox.cpp:(.text+0x2db7): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_msw_statbox.o):statbox.cpp:(.text+0x2ed2): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_statusbar.o):statusbar.cpp:(.text+0x1a10): undefined reference to `__imp_OpenThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_statusbar.o):statusbar.cpp:(.text+0x1a3e): undefined reference to `__imp_GetThemeBackgroundContentRect'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_statusbar.o):statusbar.cpp:(.text+0x1a75): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_statusbar.o):statusbar.cpp:(.text+0x237d): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0x4bd): undefined reference to `__imp_OpenThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0x4d6): undefined reference to `__imp_IsThemePartDefined'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0x4f8): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0x53e): undefined reference to `__imp_GetThemePartSize'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0x567): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0x60f): undefined reference to `__imp_OpenThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0x6b5): undefined reference to `__imp_DrawThemeBackground'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0x712): undefined reference to `__imp_GetThemeBackgroundContentRect'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0x7c2): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0x8c9): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0x931): undefined reference to `__imp_OpenThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0x945): undefined reference to `__imp_IsThemePartDefined'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0x9a2): undefined reference to `__imp_GetThemePartSize'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0x9ef): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0xa38): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0xa81): undefined reference to `__imp_OpenThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0xabd): undefined reference to `__imp_IsThemePartDefined'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0xb14): undefined reference to `__imp_IsThemeBackgroundPartiallyTransparent'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0xb51): undefined reference to `__imp_DrawThemeParentBackground'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0xbae): undefined reference to `__imp_DrawThemeBackground'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0xbf6): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0xc91): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0xcf6): undefined reference to `__imp_OpenThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0xd26): undefined reference to `__imp_IsThemePartDefined'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0xdb7): undefined reference to `__imp_DrawThemeBackground'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0xe01): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0xe3b): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0xfd6): undefined reference to `__imp_OpenThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0x1095): undefined reference to `__imp_DrawThemeBackground'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0x10ba): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0x111d): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0x11b6): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0x11f6): undefined reference to `__imp_OpenThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0x12a4): undefined reference to `__imp_DrawThemeBackground'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0x12c9): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0x132d): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0x1395): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0x14bf): undefined reference to `__imp_OpenThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0x151e): undefined reference to `__imp_GetThemeColor'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0x17d2): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0x1848): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0x1963): undefined reference to `__imp_OpenThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0x1a1b): undefined reference to `__imp_DrawThemeBackground'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0x1bb6): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0x1ca5): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0x24d1): undefined reference to `__imp_DrawThemeBackground'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0x2630): undefined reference to `__imp_OpenThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0x266a): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0x2693): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0x26d9): undefined reference to `__imp_OpenThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0x273d): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0x27b7): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0x2823): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0x2b27): undefined reference to `__imp_OpenThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0x2b81): undefined reference to `__imp_IsThemePartDefined'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0x2be1): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_renderer.o):renderer.cpp:(.text+0x33c8): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_uxtheme.o):uxtheme.cpp:(.text+0x6): undefined reference to `__imp_IsAppThemed'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_uxtheme.o):uxtheme.cpp:(.text+0x12): undefined reference to `__imp_IsThemeActive'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_combo.o):combo.cpp:(.text+0xf3f): undefined reference to `__imp_OpenThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_combo.o):combo.cpp:(.text+0x1249): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_combo.o):combo.cpp:(.text+0x1849): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_combo.o):combo.cpp:(.text+0x1aa9): undefined reference to `__imp_OpenThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_combo.o):combo.cpp:(.text+0x1c01): undefined reference to `__imp_IsThemeBackgroundPartiallyTransparent'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_combo.o):combo.cpp:(.text+0x1c31): undefined reference to `__imp_DrawThemeParentBackground'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_combo.o):combo.cpp:(.text+0x1c6d): undefined reference to `__imp_DrawThemeBackground'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_combo.o):combo.cpp:(.text+0x1cbd): undefined reference to `__imp_DrawThemeBackground'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_combo.o):combo.cpp:(.text+0x1d85): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_combo.o):combo.cpp:(.text+0x22c9): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_msw_notebook.o):notebook.cpp:(.text+0x1861): undefined reference to `__imp_OpenThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_msw_notebook.o):notebook.cpp:(.text+0x18c1): undefined reference to `__imp_GetThemeBackgroundExtent'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_msw_notebook.o):notebook.cpp:(.text+0x1918): undefined reference to `__imp_DrawThemeBackground'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_msw_notebook.o):notebook.cpp:(.text+0x1968): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_msw_notebook.o):notebook.cpp:(.text+0x19cd): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_msw_notebook.o):notebook.cpp:(.text+0x1e56): undefined reference to `__imp_OpenThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_msw_notebook.o):notebook.cpp:(.text+0x1e87): undefined reference to `__imp_GetThemeColor'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_msw_notebook.o):notebook.cpp:(.text+0x1f78): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_msw_notebook.o):notebook.cpp:(.text+0x2008): undefined reference to `__imp_GetCurrentThemeName'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_msw_notebook.o):notebook.cpp:(.text+0x2294): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_msw_notebook.o):notebook.cpp:(.text+0x30a5): undefined reference to `__imp_SetWindowTheme'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_msw_notebook.o):notebook.cpp:(.text+0x6760): undefined reference to `__imp_OpenThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_msw_notebook.o):notebook.cpp:(.text+0x67a0): undefined reference to `__imp_GetThemeBackgroundExtent'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_msw_notebook.o):notebook.cpp:(.text+0x67c3): undefined reference to `__imp_DrawThemeBackground'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_msw_notebook.o):notebook.cpp:(.text+0x67d1): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_msw_notebook.o):notebook.cpp:(.text+0x67eb): undefined reference to `__imp_CloseThemeData'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_access.o):access.cpp:(.text+0x1e9): undefined reference to `CreateStdAccessibleObject'
  C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u_core.a(corelib_systhemectrl.o):systhemectrl.cpp:(.text+0x4f): undefined reference to `__imp_SetWindowTheme'
  collect2.exe: error: ld returned 1 exit status
  </code></pre>