[CMake] cmake and wxwidgets on windows
Werner Smekal
smekal at iap.tuwien.ac.at
Mon Nov 3 10:40:56 EST 2008
Hi John,
we see that the unicode build is linked into minimal.exe. Please run
mingw32-make clean
mingw32-make VERBOSE=1
and send the output to the list, so that we can see how minimal.cpp is
compiled :). I don't have the unicode built compiled here on Win32, but
if I run
mingw32-make -f makefile.gcc MONOLOTHIC=0 SHARED=1 BUILD=release UNICODE=1
in the samples/minimal folder, there is one extra flag (apart from that
lib\gcc_dll\mswu is used as include dir instead of lib\gcc_dll\msw):
-D_UNICODE
so apart from sending the info I asked you above to the list, you could
try to add
add_definitions(-D_UNICODE)
to your cmake test file. This is just a temporary fix, since if
FindwxWidgets.cmake doesn't set that, this is a bug.
Regards,
Werner
John wrote:
> Werner Smekal <smekal at ...> writes:
>
>> 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
>
> hi werner,
>
> below you can find the output of make VERBOSE=1
>
> John
>
> "C:\Programme\CMake 2.6\bin\cmake.exe" -HC:\minimal -BC:\minimal\bin --check-bui
> ld-system CMakeFiles\Makefile.cmake 0
> cd c:\minimal\bin && "C:\Programme\CMake 2.6\bin\cmake.exe" -E cmake_progress_st
> art C:\minimal\bin\CMakeFiles C:\minimal\bin\CMakeFiles\progress.make
> cd c:\minimal\bin && mingw32-make -f CMakeFiles\Makefile2 all
> mingw32-make[1]: Entering directory `C:/minimal/bin'
> mingw32-make -f CMakeFiles\minimal.dir\build.make CMakeFiles/minimal.dir/depend
> mingw32-make[2]: Entering directory `C:/minimal/bin'
> "C:\Programme\CMake 2.6\bin\cmake.exe" -E cmake_depends "MinGW Makefiles" C:\min
> imal C:\minimal C:\minimal\bin C:\minimal\bin C:\minimal\bin\CMakeFiles\minimal.
> dir\DependInfo.cmake --color=
> mingw32-make[2]: Leaving directory `C:/minimal/bin'
> mingw32-make -f CMakeFiles\minimal.dir\build.make CMakeFiles/minimal.dir/build
> mingw32-make[2]: Entering directory `C:/minimal/bin'
> Linking CXX executable minimal.exe
> cd C:\minimal\bin && "C:\Programme\CMake 2.6\bin\cmake.exe" -E cmake_link_script
> CMakeFiles\minimal.dir\link.txt --verbose=1
> c:\MinGW\bin\g++.exe CMakeFiles\minimal.dir\minimal.cpp.obj -o minimal.exe
> -Wl,--out-implib,libminimal.dll.a -Wl,--major-image-version,0,--minor-image-ver
> sion,0 C:\wx\wx289\lib\gcc_dll\libwxbase28u.a C:\wx\wx289\lib\gcc_dll\libwxmsw2
> 8u_core.a C:\wx\wx289\lib\gcc_dll\libwxpng.a C:\wx\wx289\lib\gcc_dll\libwxtiff.a
> C:\wx\wx289\lib\gcc_dll\libwxjpeg.a C:\wx\wx289\lib\gcc_dll\libwxzlib.a C:\wx\w
> x289\lib\gcc_dll\libwxregexu.a C:\wx\wx289\lib\gcc_dll\libwxexpat.a -lwinmm -lco
> mctl32 -lrpcrt4 -lwsock32
> 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[2]: Leaving directory `C:/minimal/bin'
> mingw32-make[1]: *** [CMakeFiles/minimal.dir/all] Error 2
> mingw32-make[1]: Leaving directory `C:/minimal/bin'
> mingw32-make: *** [all] Error 2
>
>
>
> _______________________________________________
> 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