Author Topic: wxwidgets compiling problem "cannot find -lwxmsw28u_core"  (Read 12724 times)

code2d

  • Guest
wxwidgets compiling problem "cannot find -lwxmsw28u_core"
« on: May 24, 2007, 04:08:30 am »
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.

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
Any Ideas what is the problem?

-thanks

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: wxwidgets compiling problem "cannot find -lwxmsw28u_core"
« Reply #1 on: May 24, 2007, 05:13:15 am »
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

C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Deschamps

  • Multiple posting newcomer
  • *
  • Posts: 120
Re: wxwidgets compiling problem "cannot find -lwxmsw28u_core"
« Reply #2 on: May 24, 2007, 12:39:32 pm »
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
Any Ideas what is the problem?

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).
Those who were seen dancing were thought to be insane by those who could not hear the music

code2d

  • Guest
Re: wxwidgets compiling problem "cannot find -lwxmsw28u_core"
« Reply #3 on: May 25, 2007, 04:12:47 am »
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

Any idea what I'm doing wrong? 

-thanks

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: wxwidgets compiling problem "cannot find -lwxmsw28u_core"
« Reply #4 on: May 25, 2007, 06:07:37 am »
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)

code2d

  • Guest
Re: wxwidgets compiling problem "cannot find -lwxmsw28u_core"
« Reply #5 on: May 25, 2007, 02:53:31 pm »
The link you gave me is dead. I checked this link http://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_2.6.3_to_develop_Code::Blocks_%28MSW%29
and the options seem the same. I used MONOLITHIC=1 and to my best knowledge it creates a monolithic build. Are you sure that I am not creating a MONOLITHIC build?

code2d

  • Guest
Re: wxwidgets compiling problem "cannot find -lwxmsw28u_core"
« Reply #6 on: May 26, 2007, 03:51:19 am »
I just checked the Installing code blocks from source on windows wiki page
http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows and it seems to be using the same options.

Is there a other guide that is different with different build options?
Does anyone think I am doing something wrong in the wizard?

-thanks
« Last Edit: May 26, 2007, 03:53:22 am by code2d »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: wxwidgets compiling problem "cannot find -lwxmsw28u_core"
« Reply #7 on: May 26, 2007, 05:38:24 am »
Does anyone think I am doing something wrong in the wizard?

I think you are doing something in the wizard wrong.

Between "use wxWidgets DLL" and "Enable Unicode" is "wxWidgets is built as an monolithic build", did you check it?

Tim S
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

code2d

  • Guest
Re: wxwidgets compiling problem "cannot find -lwxmsw28u_core"
« Reply #8 on: May 26, 2007, 05:31:56 pm »
Quote
Between "use wxWidgets DLL" and "Enable Unicode" is "wxWidgets is built as an monolithic build", did you check it?
I checked and I did not check it. That was very stupid of me  :|. It will now compile.

-Thanks for the help and it seems to me the problem has been solved
« Last Edit: May 26, 2007, 05:34:21 pm by code2d »

Offline Knx

  • Multiple posting newcomer
  • *
  • Posts: 41
Re: wxwidgets compiling problem "cannot find -lwxmsw28u_core"
« Reply #9 on: May 26, 2007, 07:19:45 pm »
I had this problem with wx 2.6.3
When they changed to 2.8.3 I got it working

I have no idea how it worked.
Using:
• Code::Blocks SVN        • wxWidGets 2.8.6
• Windows XP SP2          • MinGW Latest  Wish List • Code folding (For wxSmith and more options like NetBeans)

windows_usr

  • Guest
Re: wxwidgets compiling problem "cannot find -lwxmsw28u_core"
« Reply #10 on: May 27, 2007, 07:46:08 pm »
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.

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
Any Ideas what is the problem?

-thanks

I ever had this problem as well and i found if i dont pick debug build (only pick release build), it work fine.