When linking a project using wxWidgets with Cmake,
undefined reference to `_imp__InitCommonControls @ 0 '
This is going to be on Ubuntu under Windows using mingw32-w64, wxWidgets is pre-compiled by mingw and lies along the path /usr/lib/wx-3.1-win
From there directly and take the core and base libraries, but in some miraculous way from
libwx_mswu_core-3.1-i686-w64-mingw32.a (corelib_msw_app.o)
complains that there is no reference to the function (that is, the library with its implementation is not connected), and considering this, I include libcomctl32.a
Cmake content is as follows
include_directories(/usr/lib/wx-3.1-win/lib/wx/include/i686-w64-mingw32-msw-unicode-static-3.1 /usr/lib/wx-3.1-win/include/wx-3.1) add_executable (welcome ${src}) #${core_src}) target_link_libraries(welcome /usr/i686-w64-mingw32/lib/libcomctl32.a /usr/lib/wx-3.1-win/lib/libwx_mswu_core-3.1-i686-w64-mingw32.a /usr/lib/wx-3.1-win/lib/libwx_baseu-3.1-i686-w64-mingw32.a ) But in the end I have all the same hundreds of undefined reference. How to fix it and why if a library is connected for _imp__InitCommonControls@0 , does the error remain?
UPD:
