[CMake] cmake and wxwidgets on windows
Werner Smekal
smekal at iap.tuwien.ac.at
Mon Nov 3 09:20:00 EST 2008
Hi John,
now please run
make VERBOSE=1
and send the output to the list. Then we exactly see how cmake calls the
compiler, which version of wxWidgets is used and which macros get
defined at the command line. As Vadim wrote on the wxWidgets mailing
list, this is very likely a mixup of unicode with non-unicode code.
Regards,
Werner
On Mon, 2008-11-03 at 13:55 +0000, John wrote:
> hi Miguel,
>
> thanks for your help. I changed the CMakeLists now according to your
> suggestions and CMake finds wxwidgets now also for the minimal sample.
>
> how the CMakeLists.txt now looks like, you can also find below.
>
> as already said CMake finds wxwidgets and I can configure and
> generate a Makefile.
> however the problem that I can't compile, remains with the minimal
> sample.
>
> here the make output of make. As already mentioned it seems to be an
> problem regarding unicode.
> Do you know how I could overcome this difficulty?
>
> C:\minimal\bin>make
> Scanning dependencies of target minimal
> [100%] Building CXX object CMakeFiles/minimal.dir/minimal.cpp.obj
> Linking CXX executable minimal.exe
> CMakeFiles\minimal.dir\minimal.cpp.obj:minimal.cpp:(.text+0x1a5):
> undefined refe
> rence to `_imp___ZN12wxStringBase8InitWithEPKcjj'
> CMakeFiles\minimal.dir\minimal.cpp.obj:minimal.cpp:(.text+0x26c):
> undefined refe
> rence to `_imp___ZN12wxStringBase8InitWithEPKcjj'
> CMakeFiles\minimal.dir\minimal.cpp.obj:minimal.cpp:(.text+0x52b):
> undefined refe
> rence to `_imp___ZN12wxStringBase8InitWithEPKcjj'
> CMakeFiles\minimal.dir\minimal.cpp.obj:minimal.cpp:(.text+0x559):
> undefined refe
> rence to `_imp___ZN12wxStringBase8InitWithEPKcjj'
> CMakeFiles\minimal.dir\minimal.cpp.obj:minimal.cpp:(.text+0x60f):
> undefined refe
> rence to `_imp___ZN12wxStringBase8InitWithEPKcjj'
> CMakeFiles\minimal.dir\minimal.cpp.obj:minimal.cpp:(.text+0x63d):
> more undefined
> references to `_imp___ZN12wxStringBase8InitWithEPKcjj' follow
> CMakeFiles\minimal.dir\minimal.cpp.obj:minimal.cpp:(.text+0x1e4d):
> undefined ref
> erence to `_imp___ZN8wxString6FormatEPKcz'
> CMakeFiles\minimal.dir\minimal.cpp.obj:minimal.cpp:
> (.rdata$_ZTV5MyApp[vtable for
> MyApp]+0x44): undefined reference to `wxApp::Initialize(int&, char**)'
> collect2: ld returned 1 exit status
> mingw32-make[2]: *** [minimal.exe] Error 1
> mingw32-make[1]: *** [CMakeFiles/minimal.dir/all] Error 2
> mingw32-make: *** [all] Error 2
>
> #CMake project file for minimal
> PROJECT(minimal)
> ADD_DEFINITIONS(-Wall -Wno-sign-compare -O2)
> cmake_minimum_required(VERSION 2.6)
>
> SET(
> SRCS
> minimal.cpp
> )
>
> #############
> # wxWidgets #
> #############
> FIND_PACKAGE(wxWidgets REQUIRED base core)
> INCLUDE(${wxWidgets_USE_FILE})
>
> ADD_EXECUTABLE(minimal ${SRCS})
> TARGET_LINK_LIBRARIES(minimal ${wxWidgets_LIBRARIES})
>
> please find below the dump of the directory.
> but as wxwidgets is found now, this
> shouldn't be necessary any more.
>
> dump of directory:
> 03.11.2008 09:34 <DIR> .
> 03.11.2008 09:34 <DIR> ..
> 03.11.2008 09:22 2.101.526 libwxbase28u.a
> 03.11.2008 09:23 229.074 libwxbase28u_net.a
> 03.11.2008 09:31 34.636 libwxbase28u_xml.a
> 03.11.2008 09:21 158.734 libwxexpat.a
> 03.11.2008 09:20 146.912 libwxjpeg.a
> 03.11.2008 09:30 1.239.996 libwxmsw28u_adv.a
> 03.11.2008 09:33 509.214 libwxmsw28u_aui.a
> 03.11.2008 09:29 5.484.724 libwxmsw28u_core.a
> 03.11.2008 09:31 558.240 libwxmsw28u_html.a
> 03.11.2008 09:30 137.078 libwxmsw28u_media.a
> 03.11.2008 09:34 1.080.596 libwxmsw28u_richtext.a
> 03.11.2008 09:33 431.294 libwxmsw28u_xrc.a
> 03.11.2008 02:54 170.088 libwxpng.a
> 03.11.2008 02:54 101.106 libwxregexu.a
> 03.11.2008 09:21 327.752 libwxtiff.a
> 03.11.2008 02:54 73.036 libwxzlib.a
> 03.11.2008 09:34 <DIR> mswu
> 03.11.2008 09:22 1.679.353 wxbase28u_gcc_custom.dll
> 03.11.2008 09:23 282.628 wxbase28u_net_gcc_custom.dll
> 03.11.2008 09:31 212.711 wxbase28u_xml_gcc_custom.dll
> 03.11.2008 09:30 1.269.045 wxmsw28u_adv_gcc_custom.dll
> 03.11.2008 09:33 653.599 wxmsw28u_aui_gcc_custom.dll
> 03.11.2008 09:29 4.630.527 wxmsw28u_core_gcc_custom.dll
> 03.11.2008 09:31 975.779 wxmsw28u_html_gcc_custom.dll
> 03.11.2008 09:30 267.172 wxmsw28u_media_gcc_custom.dll
> 03.11.2008 09:34 1.633.503 wxmsw28u_richtext_gcc_custom.dll
> 03.11.2008 09:33 992.768 wxmsw28u_xrc_gcc_custom.dll
>
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
--
Dr. Werner Smekal
Institut fuer Allgemeine Physik
Technische Universitaet Wien
Wiedner Hauptstr 8-10
A-1040 Wien
Austria
email: smekal at iap.tuwien.ac.at
web: http://www.iap.tuwien.ac.at/~smekal
phone: +43-(0)1-58801-13463 (office)
+43-(0)1-58801-13469 (laboratory)
fax: +43-(0)1-58801-13499
More information about the CMake
mailing list