User forums > General (but related to Code::Blocks)
wxWidgets/Code::Blocks Nightly Build/MinGW
MVP:
Im having trouble compiling a wxWidgets application.
I follow this: Compiling_WxWidgets_With_MSYS-MinGW
I copy the libs it makes into my wxWidgets lib directory. I create a wxWidgets app and tell it my wxWidgets directory.
I link the libraries.
I compile and get:
main.cpp:: undefined reference to `_imp___ZN12wxAppConsole17CheckBuildOptionsEPKcS1_'
main.cpp:: undefined reference to `_imp___Z7wxEntryP11HINSTANCE__S0_Pci'
main.cpp:: undefined reference to `_imp__wxFrameNameStr'
main.cpp:: undefined reference to `_imp__wxDefaultSize' ... etc.
I guess I missed some steps, After creating a wxApplication project I put the minimal wx example into main.cpp.
Thanks, MVP.
Michael:
Hello,
I usually build wxWidgets with MinGW by following these instructions:
http://forums.codeblocks.org/index.php?topic=1701.0
Moreover, instead of copying the libraries, you can define and use a global variable.
Best wishes,
Michael
PS.: Do not forget to post which C::B revision are you using, OS and eventually GCC version :).
MVP:
Using April 30, 2006 nightly build, wxWidgets 2.6.3, Windows XP, MinGW (current)
Thanks for the reply, I followed the "Compile wxWidgets in Unicode mode" section.
Now I get a lot less errors. :)
Still 3 more though not sure why:
:: warning: ./wx_pch.h.gch/default_wx_pch.h.gch: created by version `3.4.4 (mingw special)', but this is version `3.4.2 (mingw-special)'
main.cpp:: undefined reference to `_imp___ZN8wxString6PrintfEPKcz'
:main.cpp:: undefined reference to `_imp___ZN12wxStringBase8InitWithEPKcjj'
:main.cpp:: undefined reference to `wxApp::Initialize(int&, char**)'
Michael:
--- Quote from: MVP on May 01, 2006, 10:22:00 pm ---:: warning: ./wx_pch.h.gch/default_wx_pch.h.gch: created by version `3.4.4 (mingw special)', but this is version `3.4.2 (mingw-special)'
--- End quote ---
Which GCC version (not MinGW) are you using? If 3.4.2, you might want to update to GCC 3.4.5 (but before update win32api and binutils files).
Also did you check the include files and libraries are included correctly?
Best wishes,
Michael
MVP:
Thanks again, I downloaded the updated core gcc, binutils, and g++, and overwrote them over my mingw installation, im guessing thats bad but the installer wouldnt grab the latest candidate, it was getting 3.4.4 not 3.4.5 and so I improvised. :shock:
The include directories, etc. I left as default, I only set the base dir of wxWidgets.
Attachment shows the links.
Edit: Updating mingw stuff according to wiki
[attachment deleted by admin]
Navigation
[0] Message Index
[#] Next page
Go to full version