Error compiling minimal wxwidgets project

General questions regarding the usage of CodeLite
srini2174
CodeLite Enthusiast
Posts: 24
Joined: Sun Nov 08, 2015 3:40 pm
Genuine User: Yes
IDE Question: C++
Contact:

Error compiling minimal wxwidgets project

Post by srini2174 »

Hi,
I have installed codelite 9.0.3 and I am trying to compile a minimal wxwidget project which is generated by default wizard. I have TDM GCC version 5.1 installed. I have also installed the prebuild wxwidget binary (compiled for TDM GCC 481 version). I am trying to compile this project using the attached CMake script. I get a series of link error. I have given an extract of the error below. Thanks in advance for any help in resolving this error.

======================================================================================================================================

Code: Select all

Linking CXX executable minimalistWin.exe
C:\ProgramFiles\cmake-3.2.2\bin\cmake.exe -E cmake_link_script CMakeFiles\minimalistWin.dir\link.txt --verbose=1
C:\ProgramFiles\cmake-3.2.2\bin\cmake.exe -E remove -f CMakeFiles\minimalistWin.dir/objects.a
C:\TDM-GCC-64\bin\ar.exe cr CMakeFiles\minimalistWin.dir/objects.a @CMakeFiles\minimalistWin.dir\objects1.rsp
C:\TDM-GCC-64\bin\g++.exe  -std=c++11  -g  -mwindows -Wl,--whole-archive CMakeFiles\minimalistWin.dir/objects.a -Wl,--no-whole-archive  -o minimalistWin.exe -Wl,--out-implib,libminimalistWin.dll.a -Wl,--major-image-version,0,--minor-image-version,0 @CMakeFiles\minimalistWin.dir\linklibs.rsp
CMakeFiles\minimalistWin.dir/objects.a(main.cpp.obj): In function `WinMain':
C:/sources/workspaces/testcodelite/minimalistWin/main.cpp:25: undefined reference to `wxEntry(HINSTANCE__*, HINSTANCE__*, char*, int)'
CMakeFiles\minimalistWin.dir/objects.a(main.cpp.obj): In function `wxCreateApp()':
C:/sources/workspaces/testcodelite/minimalistWin/main.cpp:25: undefined reference to `wxAppConsoleBase::CheckBuildOptions(char const*, char const*)'
CMakeFiles\minimalistWin.dir/objects.a(main.cpp.obj): In function `wxObject::~wxObject()':
C:/wxMSW-3.0.2_gcc481TDM/include/wx/object.h:361: undefined reference to `wxObject::UnRef()'
CMakeFiles\minimalistWin.dir/objects.a(main.cpp.obj): In function `wxArrayString::wxArrayString()':
C:/wxMSW-3.0.2_gcc481TDM/include/wx/arrstr.h:133: undefined reference to `wxArrayString::Init(bool)'
CMakeFiles\minimalistWin.dir/objects.a(main.cpp.obj): In function `wxCriticalSectionLocker::wxCriticalSectionLocker(wxCriticalSection&)':
....
undefined reference to `wxMemoryFSHandlerBase::FindFirst(wxString const&, int)'
CMakeFiles\minimalistWin.dir/objects.a(wxcrafter_bitmaps.cpp.obj):wxcrafter_bitmaps.cpp:(.rdata$_ZTV17wxMemoryFSHandler[_ZTV17wxMemoryFSHandler]+0x50): undefined reference to `wxMemoryFSHandlerBase::FindNext()'
CMakeFiles\minimalistWin.dir/objects.a(wxcrafter_bitmaps.cpp.obj): In function `wxMemoryFSHandler::~wxMemoryFSHandler()':
C:/wxMSW-3.0.2_gcc481TDM/include/wx/fs_mem.h:82: undefined reference to `wxMemoryFSHandlerBase::~wxMemoryFSHandlerBase()'
CMakeFiles\minimalistWin.dir/objects.a(wxcrafter_bitmaps.cpp.obj):wxcrafter_bitmaps.cpp:(.rdata$.refptr._ZTV12wxFileSystem[.refptr._ZTV12wxFileSystem]+0x0): undefined reference to `vtable for wxFileSystem'
collect2.exe: error: ld returned 1 exit status
mingw32-make.exe[4]: *** [minimalistWin.exe] Error 1
mingw32-make.exe[3]: *** [CMakeFiles/minimalistWin.dir/all] Error 2
mingw32-make.exe[2]: *** [all] Error 2
CMakeFiles\minimalistWin.dir\build.make:180: recipe for target 'minimalistWin.exe' failed
mingw32-make.exe[4]: Leaving directory 'C:/sources/workspaces/testcodelite/minimalistWin/build'
CMakeFiles\Makefile2:62: recipe for target 'CMakeFiles/minimalistWin.dir/all' failed
mingw32-make.exe[3]: Leaving directory 'C:/sources/workspaces/testcodelite/minimalistWin/build'
Makefile:77: recipe for target 'all' failed
mingw32-make.exe[2]: Leaving directory 'C:/sources/workspaces/testcodelite/minimalistWin/build'
mingw32-make.exe[1]: *** [all] Error 2
mingw32-make.exe: *** [All] Error 2
minimalistWin.mk:11: recipe for target 'all' failed
mingw32-make.exe[1]: Leaving directory 'C:/sources/workspaces/testcodelite/minimalistWin'
Makefile:4: recipe for target 'All' failed
====743 errors, 60 warnings, total time: 00:00:13 seconds====
BR
Srinivasan.B
You do not have the required permissions to view the files attached to this post.
User avatar
eranif
CodeLite Plugin
Posts: 6373
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Error compiling minimal wxwidgets project

Post by eranif »

This is not the place posting a wxWidgets errors. Post there only CodeLite related issues (failure to compile your application does not count as such)
Please use the proper forum http://forums.wxwidgets.org

Eran
Make sure you have read the HOW TO POST thread
srini2174
CodeLite Enthusiast
Posts: 24
Joined: Sun Nov 08, 2015 3:40 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Error compiling minimal wxwidgets project

Post by srini2174 »

Hi,
Thanks for your response. I thought that I have made some configuration error in the project. That is why I posted it in this forum. Sorry for that. I will post this in the appropriate forum.

BR
Srinivasan
Post Reply