User forums > General (but related to Code::Blocks)

[solved] codeblocks 13.12 & wxWidgets 3.0 config, ld.exe cannot find -lwxmsw30u?

(1/7) > >>

imduke:
Hi there, I'm a totally newbie on codeblocks, I've struggled 4 days with cb & wxWidgets configurations with corrected some errors which found in the internet, but now I really need a help !

I've installed cb with TDM-GCC a few days with no problem, working pretty good. Also I wanna add wxWidgets library, now the configuration progress, I followed the wxWidgets' wiki official guide: http://wiki.codeblocks.org/index.php?title=Using_wxWidgets

And I created a test project, it's the cb auto generated one, and running build, but finally I got one build error: 'ld.exe cannot find -lwxmsw30u'

My compilation & configuration progress was:

downloaded files:
1). TDM-GCC-webdl.exe (select 32bit not 32/64)
2). wxWidgets-3.0.0.zip
3). codeblocks-13.12-setup.exe

add  environment variables as C:\TDM-GCC-32\bin
mingw32-make -f makefile.gcc clean
mingw32-make -f makefile.gcc SHARED=1 UNICODE=1 MONOLITHIC=1 BUILD=debug

add environment variables as:
WXCFG = C:\wxWidgets-3.0.0
WXWIN = gcc_dll\mswud (I have no mswu directory)
add menu -> Global compiler settings -> Search directory by C:\wxWidgets-3.0.0\lib\gcc_dll\mswud

By reading the wiki guide, it says if get error like 'cann't find -lwxmsw28u' then 'You have an incorrect link library in your build options', so I've changed the line to 'WXWIN = gcc_dll\mswud', because 'mingw32-make' as a debug version, there's no mswu directory under gcc_dll, but still the same error.

It seems the cb forum has some similar 'cannot find...' questions, but after read them all, I still can't fix mine! wow, I don't know what should going to do?

Really hope that codeblocks will be designed to internally add the configurations automaticly in a short future!


Awaiting helps, thanks!

MortenMacFly:

--- Quote from: imduke on February 28, 2014, 07:32:25 am ---mingw32-make -f makefile.gcc SHARED=1 UNICODE=1 MONOLITHIC=1 BUILD=debug

--- End quote ---
If you compile the DEBUG version of wxWidgets,...


--- Quote from: imduke on February 28, 2014, 07:32:25 am ---By reading the wiki guide, it says if get error like 'cann't find -lwxmsw28u'

--- End quote ---
You should link against the debug version of the lib named wxmsw28ud.

Please note that wxWidgets also ship with pre-compiled versions of this library for your compiler. If unsure, use these.

imduke:

--- Quote from: imduke on February 28, 2014, 07:32:25 am ---By reading the wiki guide, it says if get error like 'cann't find -lwxmsw28u'

--- End quote ---
You should link against the debug version of the lib named wxmsw28ud.

Thank you for the reply, but could you please explain it more detail to me, I'm really don't know how to configure it in progress.

thanks

stahta01:
You NEED to decide what directions you are going to follow; then, you need to follow them.
You should NOT mix two different ways of using wxWidgets with CB and expect them to work!

Either follow the standard windows way of using the Global Variable WX or WX30 or do the wx-config.exe way.

wx-config way includes this step in the codeblocks setup.

--- Code: ---add environment variables as:
WXCFG = C:\wxWidgets-3.0.0
WXWIN = gcc_dll\mswud

--- End code ---

YOU MUST DECIDE.

You must tell us which way you are doing!

You need to tell us if you are using the CB wxWidgets wizard!
(If the error happens during the wizard you need to tell us.)

You need to post the full re-build log if you want help doing either way. (once finished with running wizard.)
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F

Tim S.

imduke:
Hi:

I never touched the wx-config stuffs neither I didn't know that yet, but you let me know that name now ;-)  I was just followed the wxWidgets' guide, add the Global variable purely, and start my new prject through CB's vizard, thus I think I'm in the standard windows way. Tell me if I'm wrong!

By the way, what differences are their between them?

And hope that you staffs can make a wxWidgets setup guide with step by step screenshot pictures either in Linux, Mac and windows, this will really help newbies or noobs like me to save much times, even can help you to prevent repeat answering much similar noob questions ;-)

Anyway, In my case, first of all, I just created the test project by click the wxWidget icon in the wizard, and follow the steps:
- wxWidgets version -> wxWidgets 3.0.x
- Preferred GUI Builder -> None; Application Type -> Frame Base
  (What differs between Dialog Based and Frame Based? Sorry 4 this, I'm a noob)
- wxWidgetsl location -> $(#wx) <-- which causes an error, so i gave it the exact path
  C:\wxWidgets-3.0.0
- Create "Debug" configuration
- wxWidgets Library Setting -> checked all 3 choices on
  Miscellaneous Settings -> enabled Advanced Options, and it gave me an Warning popup
  says: 'A matching Debug configuration cannot be found in the wxWidgets directory you specified...'

After done these, run build, then it says no wx/setup.h, then after googling found a tips which told me to add next line in 'Settings -> Global compiler settings -> Search directories -> Compiler'
C:\wxWidgets-3.0.0\lib\gcc_dll\mswu
and as mine doesn't have 'mswu' directory, so I changed to 'mswud', then run build, this time it says the above error: 'ld.exe cannot find -lwxmsw30u'

For to catch my mistakes, I've done the same job in virtualbox run win xp with putting the gcc stuffs in directory 'c:\etc\...'

Now is the log:

--- Code: ---
-------------- Build: Debug in aaa (compiler: GNU GCC Compiler)---------------

mingw32-g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -Wall -g -IC:\etc\wxWidgets-3.0.0\include -IC:\etc\wxWidgets-3.0.0\lib\gcc_dll\mswu -IC:\etc\wxWidgets-3.0.0\lib\gcc_dll\mswud -c C:\local\codeblocks\aaa\aaaApp.cpp -o obj\Debug\aaaApp.o
mingw32-g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -Wall -g -IC:\etc\wxWidgets-3.0.0\include -IC:\etc\wxWidgets-3.0.0\lib\gcc_dll\mswu -IC:\etc\wxWidgets-3.0.0\lib\gcc_dll\mswud -c C:\local\codeblocks\aaa\aaaMain.cpp -o obj\Debug\aaaMain.o
windres.exe -IC:\etc\wxWidgets-3.0.0\include -IC:\etc\wxWidgets-3.0.0\lib\gcc_dll\mswu -J rc -O coff -i C:\local\CODEBL~1\aaa\resource.rc -o obj\Debug\resource.res
mingw32-g++.exe -LC:\etc\wxWidgets-3.0.0\lib\gcc_dll -o bin\Debug\aaa.exe obj\Debug\aaaApp.o obj\Debug\aaaMain.o  obj\Debug\resource.res -mthreads  -lwxmsw30u -mwindows
c:/etc/tdm-gcc-32/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot find -lwxmsw30u
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 10 second(s))
1 error(s), 0 warning(s) (0 minute(s), 10 second(s))

--- End code ---

Hope that I put enough infos to help myself!

Thank you stahta01 for reply, you are a good man!

Navigation

[0] Message Index

[#] Next page

Go to full version