Code::Blocks Forums

User forums => Help => Topic started by: sggarps on August 01, 2008, 12:20:24 am

Title: Problems compiling wxWidgets template
Post by: sggarps on August 01, 2008, 12:20:24 am
Hi,

I'm having problems compiling the wxWidgets template provided by code blocks. I get the following errors:

-------------- Build: Debug in wxWidgetsTest ---------------

Compiling: resource.rc
C:\...\COMPUT~1\CODEBL~1\WXWIDG~1\resource.rc:3:24: wx/msw/wx.rc: No such file or directory
gcc: Files\wxWidgets-2.8.8\include: No such file or directory
gcc: Files\wxWidgets-2.8.8\lib\gcc_dll\mswu: No such file or directory
windres.exe: preprocessing failed.
Process terminated with status 1 (0 minutes, 0 seconds)
2 errors, 0 warnings

I recently compiled wxWidgets using MinGW and MSYS with the options: MONOLITHIC=1 UNICODE=1 SHARED=1, and I've configured the project with these options as well.

Does anybody have any idea what i've done wrong?
Title: Re: Problems compiling wxWidgets template
Post by: TDragon on August 01, 2008, 04:23:31 am
Code::Blocks' wxWidgets wizard doesn't support MSYS-compiled wxWidgets; you'll either have to adjust your project's options manually or do a regular mingw32-make build (see the wxWindowsQuickRef (http://wiki.codeblocks.org/index.php?title=WxWindowsQuickRef) for details).
Title: Re: Problems compiling wxWidgets template
Post by: sggarps on August 01, 2008, 09:03:38 am
I tried a regular MS-DOS command line (i'#m on windows XP Pro SP3) mingw32-make build, but it didn't work, I just get the following:

C:\PROGRA~1\wxWidgets-2.8.8\build\msw>mingw32-make -f makefile.gcc
if not exist gcc_mswd mkdir gcc_mswd
process_begin: CreateProcess(NULL, -c "if not exist gcc_mswd mkdir gcc_mswd", ..
.) failed.
make (e=2): The system cannot find the file specified.
mingw32-make: [gcc_mswd] Error 2 (ignored)
if not exist ..\..\lib\gcc_lib mkdir ..\..\lib\gcc_lib
process_begin: CreateProcess(NULL, -c "if not exist ..\..\lib\gcc_lib mkdir ..\.
.\lib\gcc_lib", ...) failed.
make (e=2): The system cannot find the file specified.
mingw32-make: *** [..\..\lib\gcc_lib] Error 2

Have I done something wrong here?

Which project options do i need to change to change to get this working?
Title: Re: Problems compiling wxWidgets template
Post by: sggarps on August 01, 2008, 10:21:10 am
I also recieved the same project compilation errors using wxWidgets installed from wxPack, if that's worth anything.
Title: Re: Problems compiling wxWidgets template
Post by: TDragon on August 01, 2008, 04:46:55 pm
I failed to notice another problem occurring in your first message: windres' dislike for spaces in paths. You should also try reinstalling wxWidgets to a path without spaces.

As to your error building wxWidgets from the Windows command shell, no idea what that's about; please post here if you figure it out so I can add it to the wxWindowsQuickRef FAQ.
Title: Re: Problems compiling wxWidgets template
Post by: sggarps on August 01, 2008, 05:02:10 pm
I think it may be to do with the makefile wanting to use the linux mkdir command but instead getting the MS-Dos version. Though I can't be certain. It all compiled fine in MSYS, just not in DOS.
Title: Re: Problems compiling wxWidgets template
Post by: sggarps on August 01, 2008, 05:04:32 pm
Also would windres accept using PROGRA~1 instead of "Program Files"? It would be nice to keep to keep all my programs in one place.
Title: Re: Problems compiling wxWidgets template
Post by: sggarps on August 03, 2008, 12:11:24 pm
Ok, I've installed wxPack in a path without any spaces, but now I get linker errors saying I have undefined references :(.
Title: Re: Problems compiling wxWidgets template
Post by: sggarps on August 03, 2008, 01:46:03 pm
Here's my build log:


-------------- Build: Debug in wxWidgetsTest ---------------

Compiling: resource.rc
Linking executable: bin\Debug\wxWidgetsTest.exe
obj\Debug\wxWidgetsTestApp.o: In function `_ZN16wxWidgetsTestAppD0Ev':
C:/Documents and Settings/Matthew/My Documents/Computing/Code Blocks/wxWidgetsTest/wxWidgetsTestApp.cpp:(.text+0x45): undefined reference to `__imp___ZN12wxAppConsole17CheckBuildOptionsEPKcS1_'
obj\Debug\wxWidgetsTestApp.o: In function `WinMain':
C:/Documents and Settings/Matthew/My Documents/Computing/Code Blocks/wxWidgetsTest/wxWidgetsTestApp.cpp:287: undefined reference to `__imp___Z7wxEntryP11HINSTANCE__S0_Pci'
obj\Debug\wxWidgetsTestApp.o: In function `_ZN16wxWidgetsTestApp6OnInitEv':
C:/Documents and Settings/Matthew/My Documents/Computing/Code Blocks/wxWidgetsTest/wxWidgetsTestApp.cpp:27: undefined reference to `__imp___ZN6wxIconC1ERK8wxStringlii'
C:/Documents and Settings/Matthew/My Documents/Computing/Code Blocks/wxWidgetsTest/wxWidgetsTestApp.cpp:27: undefined reference to `wxIcon::~wxIcon()'
C:/Documents and Settings/Matthew/My Documents/Computing/Code Blocks/wxWidgetsTest/wxWidgetsTestApp.cpp:27: undefined reference to `wxIcon::~wxIcon()'
obj\Debug\wxWidgetsTestApp.o: In function `_ZN16wxWidgetsTestAppD0Ev':
C:/Documents and Settings/Matthew/My Documents/Computing/Code Blocks/wxWidgetsTest/wxWidgetsTestApp.cpp:(.text$_ZN16wxWidgetsTestAppC1Ev[wxWidgetsTestApp::wxWidgetsTestApp()]+0xd): undefined reference to `__imp___ZN5wxAppC2Ev'
C:/Documents and Settings/Matthew/My Documents/Computing/Code Blocks/wxWidgetsTest/wxWidgetsTestApp.cpp:(.text$_ZN12wxAppConsole11GetInstanceEv[wxAppConsole::GetInstance()]+0x4): undefined reference to `__imp___ZN12wxAppConsole14ms_appInstanceE'
C:/Documents and Settings/Matthew/My Documents/Computing/Code Blocks/wxWidgetsTest/wxWidgetsTestApp.cpp:(.text$_ZN12wxStringBaseC2EPKw[wxStringBase::wxStringBase(wchar_t const*)]+0x7): undefined reference to `__imp___ZN12wxStringBase4nposE'
C:/Documents and Settings/Matthew/My Documents/Computing/Code Blocks/wxWidgetsTest/wxWidgetsTestApp.cpp:(.text$_ZN12wxStringBaseC2EPKw[wxStringBase::wxStringBase(wchar_t const*)]+0x27): undefined reference to `__imp___ZN12wxStringBase8InitWithEPKwjj'
C:/Documents and Settings/Matthew/My Documents/Computing/Code Blocks/wxWidgetsTest/wxWidgetsTestApp.cpp:(.text$_Z16wxGetTranslationPKwS0_[wxGetTranslation(wchar_t const*, wchar_t const*)]+0x7): undefined reference to `__imp___Z11wxGetLocalev'
C:/Documents and Settings/Matthew/My Documents/Computing/Code Blocks/wxWidgetsTest/wxWidgetsTestApp.cpp:(.rdata$_ZTV16wxWidgetsTestApp[vtable for wxWidgetsTestApp]+0x8): undefined reference to `wxApp::GetClassInfo() const'
C:/Documents and Settings/Matthew/My Documents/Computing/Code Blocks/wxWidgetsTest/wxWidgetsTestApp.cpp:(.rdata$_ZTV16wxWidgetsTestApp[vtable for wxWidgetsTestApp]+0x14): undefined reference to `wxObject::CreateRefData() const'
C:/Documents and Settings/Matthew/My Documents/Computing/Code Blocks/wxWidgetsTest/wxWidgetsTestApp.cpp:(.rdata$_ZTV16wxWidgetsTestApp[vtable for wxWidgetsTestApp]+0x18): undefined reference to `wxObject::CloneRefData(wxObjectRefData const*) const'
C:/Documents and Settings/Matthew/My Documents/Computing/Code Blocks/wxWidgetsTest/wxWidgetsTestApp.cpp:(.rdata$_ZTV16wxWidgetsTestApp[vtable for wxWidgetsTestApp]+0x1c): undefined reference to `wxEvtHandler::ProcessEvent(wxEvent&)'
C:/Documents and Settings/Matthew/My Documents/Computing/Code Blocks/wxWidgetsTest/wxWidgetsTestApp.cpp:(.rdata$_ZTV16wxWidgetsTestApp[vtable for wxWidgetsTestApp]+0x20): undefined reference to `wxEvtHandler::SearchEventTable(wxEventTable&, wxEvent&)'
C:/Documents and Settings/Matthew/My Documents/Computing/Code Blocks/wxWidgetsTest/wxWidgetsTestApp.cpp:(.rdata$_ZTV16wxWidgetsTestApp[vtable for wxWidgetsTestApp]+0x28): undefined reference to `wxEvtHandler::TryParent(wxEvent&)'
C:/Documents and Settings/Matthew/My Documents/Computing/Code Blocks/wxWidgetsTest/wxWidgetsTestApp.cpp:(.rdata$_ZTV16wxWidgetsTestApp[vtable for wxWidgetsTestApp]+0x2c): undefined reference to `wxApp::GetEventTable() const'
C:/Documents and Settings/Matthew/My Documents/Computing/Code Blocks/wxWidgetsTest/wxWidgetsTestApp.cpp:(.rdata$_ZTV16wxWidgetsTestApp[vtable for wxWidgetsTestApp]+0x30): undefined reference to `wxApp::GetEventHashTable() const'
C:/Documents and Settings/Matthew/My Documents/Computing/Code Blocks/wxWidgetsTest/wxWidgetsTestApp.cpp:(.rdata$_ZTV16wxWidgetsTestApp[vtable for wxWidgetsTestApp]+0x34): undefined reference to `wxEvtHandler::DoSetClientObject(wxClientData*)'
C:/Documents and Settings/Matthew/My Documents/Computing/Code Blocks/wxWidgetsTest/wxWidgetsTestApp.cpp:(.rdata$_ZTV16wxWidgetsTestApp[vtable for wxWidgetsTestApp]+0x38): undefined reference to `wxEvtHandler::DoGetClientObject() const'
C:/Documents and Settings/Matthew/My Documents/Computing/Code Blocks/wxWidgetsTest/wxWidgetsTestApp.cpp:(.rdata$_ZTV16wxWidgetsTestApp[vtable for wxWidgetsTestApp]+0x3c): undefined reference to `wxEvtHandler::DoSetClientData(void*)'
C:/Documents and Settings/Matthew/My Documents/Computing/Code Blocks/wxWidgetsTest/wxWidgetsTestApp.cpp:(.rdata$_ZTV16wxWidgetsTestApp[vtable for wxWidgetsTestApp]+0x40): undefined reference to `wxEvtHandler::DoGetClientData() const'
C:/Documents and Settings/Matthew/My Documents/Computing/Code Blocks/wxWidgetsTest/wxWidgetsTestApp.cpp:(.rdata$_ZTV16wxWidgetsTestApp[vtable for wxWidgetsTestApp]+0x44): undefined reference to `wxApp::Initialize(int&, wchar_t**)'
C:/Documents and Settings/Matthew/My Documents/Computing/Code Blocks/wxWidgetsTest/wxWidgetsTestApp.cpp:(.rdata$_ZTV16wxWidgetsTestApp[vtable for wxWidgetsTestApp]+0x50): undefined reference to `wxAppBase::OnInitGui()'
C:/Documents and Settings/Matthew/My Documents/Computing/Code Blocks/wxWidgetsTest/wxWidgetsTestApp.cpp:(.rdata$_ZTV16wxWidgetsTestApp[vtable for wxWidgetsTestApp]+0x54): undefined reference to `wxAppBase::OnRun()'
C:/Documents and Settings/Matthew/My Documents/Computing/Code Blocks/wxWidgetsTest/wxWidgetsTestApp.cpp:(.rdata$_ZTV16wxWidgetsTestApp[vtable for wxWidgetsTestApp]+0x58): undefined reference to `wxAppBase::OnExit()'
C:/Documents and Settings/Matthew/My Documents/Computing/Code Blocks/wxWidgetsTest/wxWidgetsTestApp.cpp:(.rdata$_ZTV16wxWidgetsTestApp[vtable for wxWidgetsTestApp]+0x5c): undefined reference to `wxApp::CleanUp()'
C:/Documents and Settings/Matthew/My Documents/Computing/Code Blocks/wxWidgetsTest/wxWidgetsTestApp.cpp:(.rdata$_ZTV16wxWidgetsTestApp[vtable for wxWidgetsTestApp]+0x64): undefined reference to `wxAppBase::Exit()'
C:/Documents and Settings/Matthew/My Documents/Computing/Code Blocks/wxWidgetsTest/wxWidgetsTestApp.cpp:(.rdata$_ZTV16wxWidgetsTestApp[vtable for wxWidgetsTestApp]+0x68): undefined reference to `wxAppBase::OnInitCmdLine(wxCmdLineParser&)'
C:/Documents and Settings/Matthew/My Documents/Computing/Code Blocks/wxWidgetsTest/wxWidgetsTestApp.cpp:(.rdata$_ZTV16wxWidgetsTestApp[vtable for wxWidgetsTestApp]+0x6c): undefined reference to `wxAppBase::OnCmdLineParsed(wxCmdLineParser&)'
C:/Documents and Settings/Matthew/My Documents/Computing/Code Blocks/wxWidgetsTest/wxWidgetsTestApp.cpp:(.rdata$_ZTV16wxWidgetsTestApp[vtable for wxWidgetsTestApp]+0x70): undefined reference to `wxAppConsole::OnCmdLineHelp(wxCmdLineParser&)'
C:/Documents and Settings/Matthew/My Documents/Computing/Code Blocks/wxWidgetsTest/wxWidgetsTestApp.cpp:(.rdata$_ZTV16wxWidgetsTestApp[vtable for wxWidgetsTestApp]+0x74): undefined reference to `wxAppConsole::OnCmdLineError(wxCmdLineParser&)'
C:/Documents and Settings/Matthew/My Documents/Computing/Code Blocks/wxWidgetsTest/wxWidgetsTestApp.cpp:(.rdata$_ZTV16wxWidgetsTestApp[vtable for wxWidgetsTestApp]+0x78): undefined reference to `wxAppConsole::FilterEvent(wxEvent&)'
C:/Documents and Settings/Matthew/My Documents/Computing/Code Blocks/wxWidgetsTest/wxWidgetsTestApp.cpp:(.rdata$_ZTV16wxWidgetsTestApp[vtable for wxWidgetsTestApp]+0x7c): undefined reference to `wxAppConsole::HandleEvent(wxEvtHandler*, void (wxEvtHandler::*)(wxEvent&), wxEvent&) const'
C:/Documents and Settings/Matthew/My Documents/Computing/Code Blocks/wxWidgetsTest/wxWidgetsTestApp.cpp:(.rdata$_ZTV16wxWidgetsTestApp[vtable for wxWidgetsTestApp]+0x84): undefined reference to `wxAppConsole::ProcessPendingEvents()'
C:/Documents and Settings/Matthew/My Documents/Computing/Code Blocks/wxWidgetsTest/wxWidgetsTestApp.cpp:(.rdata$_ZTV16wxWidgetsTestApp[vtable for wxWidgetsTestApp]+0x88): undefined reference to `wxApp::Yield(bool)'
C:/Documents and Settings/Matthew/My Documents/Computing/Code Blocks/wxWidgetsTest/wxWidgetsTestApp.cpp:(.rdata$_ZTV16wxWidgetsTestApp[vtable for wxWidgetsTestApp]+0x8c): undefined reference to `wxApp::WakeUpIdle()'
C:/Documents and Settings/Matthew/My Documents/Computing/Code Blocks/wxWidgetsTest/wxWidgetsTestApp.cpp:(.rdata$_ZTV16wxWidgetsTestApp[vtable for wxWidgetsTestApp]+0x90): undefined reference to `wxAppConsole::OnAssertFailure(wchar_t const*, int, wchar_t const*, wchar_t const*, wchar_t const*)'
C:/Documents and Settings/Matthew/My Documents/Computing/Code Blocks/wxWidgetsTest/wxWidgetsTestApp.cpp:(.rdata$_ZTV16wxWidgetsTestApp[vtable for wxWidgetsTestApp]+0x94): undefined reference to `wxAppConsole::OnAssert(wchar_t const*, int, wchar_t const*, wchar_t const*)'
C:/Documents and Settings/Matthew/My Documents/Computing/Code Blocks/wxWidgetsTest/wxWidgetsTestApp.cpp:(.rdata$_ZTV16wxWidgetsTestApp[vtable for wxWidgetsTestApp]+0x98): undefined reference to `wxAppBase::CreateTraits()'
C:/Documents and Settings/Matthew/My Documents/Computing/Code Blocks/wxWidgetsTest/wxWidgetsTestApp.cpp:(.rdata$_ZTV16wxWidgetsTestApp[vtable for wxWidgetsTestApp]+0x9c): undefined reference to `wxAppBase::MainLoop()'
C:/Documents and Settings/Matthew/My Documents/Computing/Code Blocks/wxWidgetsTest/wxWidgetsTestApp.cpp:(.rdata$_ZTV16wxWidgetsTestApp[vtable for wxWidgetsTestApp]+0xa0): undefined reference to `wxAppBase::ExitMainLoop()'
C:/Documents and Settings/Matthew/My Documents/Computing/Code Blocks/wxWidgetsTest/wxWidgetsTestApp.cpp:(.rdata$_ZTV16wxWidgetsTestApp[vtable for wxWidgetsTestApp]+0xa4): undefined reference to `wxAppBase::Pending()'
C:/Documents and Settings/Matthew/My Documents/Computing/Code Blocks/wxWidgetsTest/wxWidgetsTestApp.cpp:(.rdata$_ZTV16wxWidgetsTestApp[vtable for wxWidgetsTestApp]+0xa8): undefined reference to `wxAppBase::Dispatch()'
C:/Documents and Settings/Matthew/My Documents/Computing/Code Blocks/wxWidgetsTest/wxWidgetsTestApp.cpp:(.rdata$_ZTV16wxWidgetsTestApp[vtable for wxWidgetsTestApp]+0xac): undefined reference to `wxAppBase::ProcessIdle()'
C:/Documents and Settings/Matthew/My Documents/Computing/Code Blocks/wxWidgetsTest/wxWidgetsTestApp.cpp:(.rdata$_ZTV16wxWidgetsTestApp[vtable for wxWidgetsTestApp]+0xb0): undefined reference to `wxAppBase::SendIdleEvents(wxWindow*, wxIdleEvent&)'
C:/Documents and Settings/Matthew/My Documents/Computing/Code Blocks/wxWidgetsTest/wxWidgetsTestApp.cpp:(.rdata$_ZTV16wxWidgetsTestApp[vtable for wxWidgetsTestApp]+0xb4): undefined reference to `wxApp::OnExceptionInMainLoop()'
C:/Documents and Settings/Matthew/My Documents/Computing/Code Blocks/wxWidgetsTest/wxWidgetsTestApp.cpp:(.rdata$_ZTV16wxWidgetsTestApp[vtable for wxWidgetsTestApp]+0xbc): undefined reference to `wxAppBase::GetTopWindow() const'
C:/Documents and Settings/Matthew/My Documents/Computing/Code Blocks/wxWidgetsTest/wxWidgetsTestApp.cpp:(.rdata$_ZTV16wxWidgetsTestApp[vtable for wxWidgetsTestApp]+0xc0): undefined reference to `wxAppBase::GetDisplayMode() const'
obj\Debug\wxWidgetsTestApp.o: In function `_Z8wxGetAppv':
C:/Documents and Settings/Matthew/My Documents/Computing/Code Blocks/wxWidgetsTest/wxWidgetsTestApp.cpp:21: undefined reference to `wxAppBase::GetLayoutDirection() const'
Process terminated with status 1 (0 minutes, 10 seconds)
50 errors, 0 warnings
 
Title: Re: Problems compiling wxWidgets template
Post by: sggarps on August 04, 2008, 11:35:27 am
Does anybody have any ideas? I've spent ages trying to get wxWidgets to work with Code::Blocks and it's like banging my head against a brick wall.
Title: Re: Problems compiling wxWidgets template
Post by: sggarps on August 04, 2008, 12:11:51 pm
YES! Finally managed to get it working after using the instructions from here:

http://wxpack.sourceforge.net/Tutorials/CodeBlocks
Title: Re: Problems compiling wxWidgets template
Post by: oBFusCATed on September 08, 2009, 12:38:23 pm
I tried a regular MS-DOS command line (i'#m on windows XP Pro SP3) mingw32-make build, but it didn't work, I just get the following:

C:\PROGRA~1\wxWidgets-2.8.8\build\msw>mingw32-make -f makefile.gcc
if not exist gcc_mswd mkdir gcc_mswd
process_begin: CreateProcess(NULL, -c "if not exist gcc_mswd mkdir gcc_mswd", ..
.) failed.
make (e=2): The system cannot find the file specified.
mingw32-make: [gcc_mswd] Error 2 (ignored)
if not exist ..\..\lib\gcc_lib mkdir ..\..\lib\gcc_lib
process_begin: CreateProcess(NULL, -c "if not exist ..\..\lib\gcc_lib mkdir ..\.
.\lib\gcc_lib", ...) failed.
make (e=2): The system cannot find the file specified.
mingw32-make: *** [..\..\lib\gcc_lib] Error 2

Have I done something wrong here?

Which project options do i need to change to change to get this working?

I've the same problem today :(
The only thing I've found about it is this: http://www.mail-archive.com/make-w32@gnu.org/msg01859.html
I've tried several TDM installers + several binutils (I've seen a jens post mentioning that that might cause the problem)....

WinXP sp3 (I suppose)

Any ideas?