User forums > Help
wxwidgets compiling problem "cannot find -lwxmsw28u_core"
code2d:
I recently downloaded wxWidgets 2.8.4 and tried to build is release. I got the newest nightly build and used the following instructions that I got of the wiki.
--- Quote ---
Now it is time to compile wxWidgets, open the command prompt and change to the wxWidgets directory:
cd <WXWIN>\build\msw
SET PATH=<MINGW>\bin;<MINGW>\mingw32\bin
NOTE: This is normally SET PATH=C:\MingGW\bin;C:\MingGW\mingw32\bin
Now the first thing to do is to clean up the source:
mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 BUILD=release clean
NOTE: Make sure you use exactly the same options for this step and for the build step below. The clean target uses these variables and only cleans the specified version of the generated object and library files (so it will actually not clean the intended files if these variables are not identical).
NOTE: If you still have problems with compiling after cleaning, you could try to manually remove the gcc_msw directory under the build\msw directory. This directory is the place where the object files are stored.
When everything is clean you can start actually compiling wxWidgets:
mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 BUILD=release
NOTE: These options are the officially supported Code::Blocks options. If you want another version of wxWidgets (debug or non-unicode) you still have to make sure you build a MONOLITHIC version (one big DLL) for linking Code::Blocks against.
Now you can get a cup of coffee or do something else because this step takes some time. Make sure there was no compilation error before you continue.
--- End quote ---
After I am done and into code blocks and finished setting up the project and try to build I get the error
--- Quote ---free, release,
cannot find -lwxmsw28u_core
--- End quote ---
Any Ideas what is the problem?
-thanks
stahta01:
Why do you think you should have the "wxmsw28u_core" library?
It is NOT part of a monolithic build. I think it is part of an multilib build. (MONOLITHIC=0).
Tim S
Deschamps:
--- Quote from: code2d ---After I am done and into code blocks and finished setting up the project and try to build I get the error
--- Quote ---free, release,
cannot find -lwxmsw28u_core
--- End quote ---
Any Ideas what is the problem?
--- End quote ---
The project you are trying to compile and link isn't configured for use the monolithic library build (as stahta01 has said). So, you must open your "Build options" and delete all the wxmsw28u_* libs references, including then an alone "wxmsw28u" (without quotes).
If you use a wizard for create a project, remember to select the proper options (those that match your current wxWidget library build, e.g. dynamic, monolithic, unicode, etc).
code2d:
When I use the wizard I only choose "use wxWidgets DLL" and "enable Unicode". For the global variables I just selected the base to go to the wxWidgets folder eg "C:\wxWidgets-2.8.4". This to my best knowledge is correct.
I tried going to project>build options and selected release. Went to the drop down box and selected linker settings and deleted "libwxmsw28u_core". I try to compile and its says cannot find "lwxbase28u". So I go and delete that also. Then I get the following error.
--- Quote ----------------- Build: Release in fh ---------------
Linking executable: bin\Release\fh.exe
obj\Release\fhMain.o:fhMain.cpp:(.text+0x44): undefined reference to `_imp___ZN12wxStringBase4nposE'
obj\Release\fhMain.o:fhMain.cpp:(.text+0x60): undefined reference to `_imp___ZN12wxStringBase8InitWithEPKwjj'
obj\Release\fhMain.o:fhMain.cpp:(.text+0xbb): undefined reference to `_imp___ZN12wxStringBase10ConcatSelfEjPKwj'
obj\Release\fhMain.o:fhMain.cpp:(.text+0xec): undefined reference to `_imp___ZN12wxStringBase10ConcatSelfEjPKwj'
obj\Release\fhMain.o:fhMain.cpp:(.text+0x19d): undefined reference to `_imp__wxDialogNameStr'
obj\Release\fhMain.o:fhMain.cpp:(.text+0x1c0): undefined reference to `_imp___ZN12wxStringBase4nposE'
obj\Release\fhMain.o:fhMain.cpp:(.text+0x1de): undefined reference to `_imp___ZN12wxStringBase8InitWithEPKwjj'
obj\Release\fhMain.o:fhMain.cpp:(.text+0x1ef): undefined reference to `_imp___ZN20wxTopLevelWindowBaseC2Ev'
obj\Release\fhMain.o:fhMain.cpp:(.text+0x20b): undefined reference to `_imp___ZTV19wxTopLevelWindowMSW'
obj\Release\fhMain.o:fhMain.cpp:(.text+0x23c): undefined reference to `_imp___ZN19wxTopLevelWindowMSW4InitEv'
obj\Release\fhMain.o:fhMain.cpp:(.text+0x24d): undefined reference to `_imp___ZTV16wxTopLevelWindow'
obj\Release\fhMain.o:fhMain.cpp:(.text+0x25d): undefined reference to `_imp___ZN19wxTopLevelWindowMSW4InitEv'
obj\Release\fhMain.o:fhMain.cpp:(.text+0x26e): undefined reference to `_imp___ZTV12wxDialogBase'
obj\Release\fhMain.o:fhMain.cpp:(.text+0x28e): undefined reference to `_imp___ZN18wxControlContainerC1EP8wxWindow'
obj\Release\fhMain.o:fhMain.cpp:(.text+0x2a6): undefined reference to `_imp___ZN12wxDialogBase4InitEv'
obj\Release\fhMain.o:fhMain.cpp:(.text+0x2ab): undefined reference to `_imp___ZTV8wxDialog'
obj\Release\fhMain.o:fhMain.cpp:(.text+0x2bb): undefined reference to `_imp___ZN8wxDialog4InitEv'
obj\Release\fhMain.o:fhMain.cpp:(.text+0x2e8): undefined reference to `_imp__wxDefaultSize'
obj\Release\fhMain.o:fhMain.cpp:(.text+0x2f8): undefined reference to `_imp__wxDefaultPosition'
obj\Release\fhMain.o:fhMain.cpp:(.text+0x312): undefined reference to `_imp___ZN8wxDialog6CreateEP8wxWindowiRK8wxStringRK7wxPointRK6wxSizelS4_'
obj\Release\fhMain.o:fhMain.cpp:(.text+0x33e): undefined reference to `_imp__wxDefaultSize'
obj\Release\fhMain.o:fhMain.cpp:(.text+0x395): undefined reference to `_imp___ZN10wxBoxSizerC1Ei'
obj\Release\fhMain.o:fhMain.cpp:(.text+0x3ae): undefined reference to `_imp___ZN12wxStringBase4nposE'
obj\Release\fhMain.o:fhMain.cpp:(.text+0x3da): undefined reference to `_imp___ZN12wxStringBase8InitWithEPKwjj'
obj\Release\fhMain.o:fhMain.cpp:(.text+0x3e2): undefined reference to `_imp__wxStaticTextNameStr'
obj\Release\fhMain.o:fhMain.cpp:(.text+0x3f3): undefined reference to `_imp___ZN12wxStringBase4nposE'
obj\Release\fhMain.o:fhMain.cpp:(.text+0x411): undefined reference to `_imp___ZN12wxStringBase8InitWithEPKwjj'
obj\Release\fhMain.o:fhMain.cpp:(.text+0x455): undefined reference to `_imp___ZN12wxWindowBaseC2Ev'
obj\Release\fhMain.o:fhMain.cpp:(.text+0x469): undefined reference to `_imp___ZTV8wxWindow'
obj\Release\fhMain.o:fhMain.cpp:(.text+0x499): undefined reference to `_imp___ZN8wxWindow4InitEv'
obj\Release\fhMain.o:fhMain.cpp:(.text+0x4aa): undefined reference to `_imp___ZTV13wxControlBase'
obj\Release\fhMain.o:fhMain.cpp:(.text+0x4c0): undefined reference to `_imp___ZTV9wxControl'
obj\Release\fhMain.o:fhMain.cpp:(.text+0x4d4): undefined reference to `_imp___ZN15wxBaseArrayLongC2Ev'
obj\Release\fhMain.o:fhMain.cpp:(.text+0x4f4): undefined reference to `_imp___ZTV12wxStaticText'
obj\Release\fhMain.o:fhMain.cpp:(.text+0x514): undefined reference to `_imp__wxDefaultSize'
obj\Release\fhMain.o:fhMain.cpp:(.text+0x525): undefined reference to `_imp__wxDefaultPosition'
obj\Release\fhMain.o:fhMain.cpp:(.text+0x547): undefined reference to `_imp___ZN12wxStaticText6CreateEP8wxWindowiRK8wxStringRK7wxPointRK6wxSizelS4_'
obj\Release\fhMain.o:fhMain.cpp:(.text+0x5a0): undefined reference to `_imp___ZN12wxStringBase4nposE'
obj\Release\fhMain.o:fhMain.cpp:(.text+0x5c0): undefined reference to `_imp___ZN12wxStringBase8InitWithEPKwjj'
obj\Release\fhMain.o:fhMain.cpp:(.text+0x5ce): undefined reference to `_imp___ZTV6wxFont'
obj\Release\fhMain.o:fhMain.cpp:(.text+0x608): undefined reference to `_imp__wxDefaultSize'
obj\Release\fhMain.o:fhMain.cpp:(.text+0x622): undefined reference to `_imp___ZN6wxFont8DoCreateEiRK6wxSizebiiibRK8wxString14wxFontEncoding'
obj\Release\fhMain.o:fhMain.cpp:(.text+0x66d): undefined reference to `wxFont::~wxFont()'
obj\Release\fhMain.o:fhMain.cpp:(.text+0x6ee): undefined reference to `_imp___ZN11wxSizerItemC1EP8wxWindowiiiP8wxObject'
obj\Release\fhMain.o:fhMain.cpp:(.text+0x74b): undefined reference to `_imp___ZN10wxBoxSizerC1Ei'
obj\Release\fhMain.o:fhMain.cpp:(.text+0x764): undefined reference to `_imp___ZN12wxStringBase4nposE'
obj\Release\fhMain.o:fhMain.cpp:(.text+0x78c): undefined reference to `_imp___ZN12wxStringBase8InitWithEPKwjj'
obj\Release\fhMain.o:fhMain.cpp:(.text+0x798): undefined reference to `_imp__wxButtonNameStr'
obj\Release\fhMain.o:fhMain.cpp:(.text+0x7aa): undefined reference to `_imp___ZN12wxStringBase4nposE'
obj\Release\fhMain.o:fhMain.cpp:(.text+0x7c8): undefined reference to `_imp___ZN12wxStringBase8InitWithEPKwjj'
Process terminated with status 1 (0 minutes, 6 seconds)
50 errors, 0 warnings
--- End quote ---
Any idea what I'm doing wrong?
-thanks
rickg22:
I think you configured your wxWidgets build to be NON-monolithic. and your project tries to find the base, core, etc. instead of searching for a single library.
Here's the page on how to compile wxwidgets for Codeblocks. It applies to 2.6.2, but it can also be used to build 2.8.x.
http://wiki.codeblocks.org/index.php/Compiling_wxWidgets_2.6.1_to_develop_Code::Blocks_(MSW)
Navigation
[0] Message Index
[#] Next page
Go to full version