MantisBT - CMake
View Issue Details
0010089CMakeCMakepublic2010-01-04 03:542010-05-10 20:51
Timour 
Miguel Figueroa 
normalmajoralways
closedfixed 
CMake-2-8 
 
0010089: wxWidgets compilation problem with MinGW
Hello,
I tried to compile the wxWidgets Minimal project (located at <wxWidgetsDir>/samples/minimal) using the attached CMakeLists.txt file.
CMake generator succeeded but when I invoked make it failed with multiple errors like

libwxmsw28_core.a(corelib_window.o):window.cpp:(.text+0x1a7b): undefined reference to `wxSystemOptions::GetOptionInt(wxString const&)'

However when I changed line 27 of CMakeLists.txt from
  find_package(wxWidgets COMPONENTS base core REQUIRED)
to
  find_package(wxWidgets COMPONENTS core base REQUIRED)
build succeeded.

I spent a lot of time in attempts to fix the problem until I finally tried this permutation and that was frustrating.

This CMakeLists.txt file was not invented by myself, it was taken from http://wiki.wxwidgets.org/CMake. [^]

I think that the FindwxWidgets module must, if necessary, change the order of components chosen in find_package or indicate an error.

System information:
Windows XP SP3
MinGW 5.1.6 with gcc 3.4.5
wxWidgets 2.8.10
CMake 2.8
No tags attached.
txt CMakeLists.txt (2,193) 2010-01-04 03:54
https://public.kitware.com/Bug/file/2744/CMakeLists.txt
Issue History
2010-01-04 03:54TimourNew Issue
2010-01-04 03:54TimourFile Added: CMakeLists.txt
2010-05-10 16:06Miguel FigueroaStatusnew => assigned
2010-05-10 16:06Miguel FigueroaAssigned To => Miguel Figueroa
2010-05-10 20:51Miguel FigueroaNote Added: 0020705
2010-05-10 20:51Miguel FigueroaStatusassigned => closed
2010-05-10 20:51Miguel FigueroaResolutionopen => fixed

Notes
(0020705)
Miguel Figueroa   
2010-05-10 20:51   
I have created a patch that specifies the importance of the order for MinGW users.

A mechanism for dealing with dependency issues is another issue I have been contemplating, but haven't had the time or access to diverse platforms for testing.

I will apply the patch and will close this issue as it is addressed somewhat with the comment and the dependency checking is discussed in issue 0009775.