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

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

<< < (2/7) > >>

stahta01:
You have both

--- Code: ----IC:\etc\wxWidgets-3.0.0\lib\gcc_dll\mswu
-IC:\etc\wxWidgets-3.0.0\lib\gcc_dll\mswud

--- End code ---

Get rid of the one that does NOT exist.

You say you only built debug; is there a logical reason you are doing that instead of both?

Edit: You need to define "__WXDEBUG__" when using the wxWidgets debug library.

Tim S.

stahta01:
My build log on doing wxWidgets 3.0 Debug build Multilib (removed PCH precompile)
(Multilib is the opposite choose of Monolithic build)

Where mine says "gcc48_dll" yours should say "gcc_dll"

Where mine says "-lwxmsw30ud_core -lwxbase30ud" yours should say "-lwxmsw30ud".

Where mine says "testwx48" yours should say "aaa".

My wxWidgets base folder: "C:\wxMSW-3.0\wxWidgets-3.0.0"

Note: You build need not have "-include wx_pch.h" in it.

Note: This option is NOT needed "-Wmissing-include-dirs"

Note: Yours might not have "--use-temp-file" in it; I added that to test something long ago.

Change "wxmsw30u" to "wxmsw30ud" in "Linker Settings" under "Link Libraries"

Note: These NOT needed "-Wfatal-errors -Wno-unused-local-typedefs -Wno-attributes"

Tim S.


--- Code: ---windres.exe --use-temp-file -IC:\wxMSW-3.0\wxWidgets-3.0.0\include -IC:\wxMSW-3.0\wxWidgets-3.0.0\lib\gcc48_dll\mswud -J rc -O coff -i E:\OPENSO~1\testwx48\resource.rc -o obj\Debug\resource.res
mingw32-g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -Winvalid-pch -include wx_pch.h -DWX_PRECOMP -Wall -g -D__WXDEBUG__ -Wmissing-include-dirs -Wfatal-errors -Wno-unused-local-typedefs -Wno-attributes -IC:\wxMSW-3.0\wxWidgets-3.0.0\include -IC:\wxMSW-3.0\wxWidgets-3.0.0\lib\gcc48_dll\mswud -c E:\OpenSourceCode\testwx48\testwx48App.cpp -o obj\Debug\testwx48App.o
mingw32-g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -Winvalid-pch -include wx_pch.h -DWX_PRECOMP -Wall -g -D__WXDEBUG__ -Wmissing-include-dirs -Wfatal-errors -Wno-unused-local-typedefs -Wno-attributes -IC:\wxMSW-3.0\wxWidgets-3.0.0\include -IC:\wxMSW-3.0\wxWidgets-3.0.0\lib\gcc48_dll\mswud -c E:\OpenSourceCode\testwx48\testwx48Main.cpp -o obj\Debug\testwx48Main.o
mingw32-g++.exe -LC:\wxMSW-3.0\wxWidgets-3.0.0\lib\gcc48_dll -o bin\Debug\testwx48.exe  obj\Debug\testwx48App.o obj\Debug\testwx48Main.o obj\Debug\resource.res -mthreads  -lwxmsw30ud_core -lwxbase30ud -lwxpngd -lwxzlibd -mwindows
Output file is bin\Debug\testwx48.exe with size 1.75 MB

--- End code ---

imduke:
thanks, stahta01, it worked!
your answer helped me!

ps: other newbies who meet same trouble like me plz check the attachment file, by check on the red colored area, it will be remove the error!

v-italiano:
Hi,
i've same problem but I don't think that problem is only the __WXDEBUG__ option (checked or unchecked);
if i check this advanced option simply the problem becomes "... ld.exe cannot find -lwxmsw30ud" but in my environment
issue remains.

My build log is:

--- Code: ---mingw32-g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -Wall -g -D__WXDEBUG__ -IC:\SourceCode\Libraries\wxWidgets3.0\include -IC:\SourceCode\Libraries\wxWidgets3.0\lib\gcc_dll\mswud -c C:\Users\W7onSSD\Documents\C_PROJECTS\monitor\monitorApp.cpp -o obj\Debug\monitorApp.o
mingw32-g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -Wall -g -D__WXDEBUG__ -IC:\SourceCode\Libraries\wxWidgets3.0\include -IC:\SourceCode\Libraries\wxWidgets3.0\lib\gcc_dll\mswud -c C:\Users\W7onSSD\Documents\C_PROJECTS\monitor\monitorMain.cpp -o obj\Debug\monitorMain.o
windres.exe -IC:\SourceCode\Libraries\wxWidgets3.0\include -IC:\SourceCode\Libraries\wxWidgets3.0\lib\gcc_dll\mswud -J rc -O coff -i C:\Users\W7onSSD\Documents\C_PROJECTS\monitor\resource.rc -o obj\Debug\resource.res
mingw32-g++.exe -LC:\SourceCode\Libraries\wxWidgets3.0\lib\gcc_dll -o bin\Debug\monitor.exe obj\Debug\monitorApp.o obj\Debug\monitorMain.o  obj\Debug\resource.res -mthreads  -lwxmsw30ud -mwindows
c:/program files (x86)/codeblocks/mingw/bin/../lib/gcc/mingw32/4.7.1/../../../../mingw32/bin/ld.exe: cannot find -lwxmsw30ud
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 4 second(s))
1 error(s), 0 warning(s) (0 minute(s), 4 second(s))

--- End code ---

Problem (for me) is that wizard search in wxWidgets3.0\lib\gcc_dll\mswu or wxWidgets3.0\lib\gcc_dll\mswu when it doesn't exist. I solved changing $(#wx)\lib\gcc_dll\mswud to $(#wx)\lib\gcc48_dll\mswud in searching directory for compiler and resource compiler tabs and changing $(#wx)\lib\gcc_dll to $(#wx)\lib\gcc48_dll in linker tab.

What do you think ?

-Vit

stahta01:
That is one of the correct solution when linking against one of wxPack binary Libraries.

Building against wxWidgets 3.0 binary Libraries has a similar solution.

Tim S.


--- Quote from: v-italiano on October 02, 2014, 11:03:22 am ---Hi,
i've same problem but I don't think that problem is only the __WXDEBUG__ option (checked or unchecked);
if i check this advanced option simply the problem becomes "... ld.exe cannot find -lwxmsw30ud" but in my environment
issue remains.

My build log is:

--- Code: ---mingw32-g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -Wall -g -D__WXDEBUG__ -IC:\SourceCode\Libraries\wxWidgets3.0\include -IC:\SourceCode\Libraries\wxWidgets3.0\lib\gcc_dll\mswud -c C:\Users\W7onSSD\Documents\C_PROJECTS\monitor\monitorApp.cpp -o obj\Debug\monitorApp.o
mingw32-g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -Wall -g -D__WXDEBUG__ -IC:\SourceCode\Libraries\wxWidgets3.0\include -IC:\SourceCode\Libraries\wxWidgets3.0\lib\gcc_dll\mswud -c C:\Users\W7onSSD\Documents\C_PROJECTS\monitor\monitorMain.cpp -o obj\Debug\monitorMain.o
windres.exe -IC:\SourceCode\Libraries\wxWidgets3.0\include -IC:\SourceCode\Libraries\wxWidgets3.0\lib\gcc_dll\mswud -J rc -O coff -i C:\Users\W7onSSD\Documents\C_PROJECTS\monitor\resource.rc -o obj\Debug\resource.res
mingw32-g++.exe -LC:\SourceCode\Libraries\wxWidgets3.0\lib\gcc_dll -o bin\Debug\monitor.exe obj\Debug\monitorApp.o obj\Debug\monitorMain.o  obj\Debug\resource.res -mthreads  -lwxmsw30ud -mwindows
c:/program files (x86)/codeblocks/mingw/bin/../lib/gcc/mingw32/4.7.1/../../../../mingw32/bin/ld.exe: cannot find -lwxmsw30ud
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 4 second(s))
1 error(s), 0 warning(s) (0 minute(s), 4 second(s))

--- End code ---

Problem (for me) is that wizard search in wxWidgets3.0\lib\gcc_dll\mswu or wxWidgets3.0\lib\gcc_dll\mswu when it doesn't exist. I solved changing $(#wx)\lib\gcc_dll\mswud to $(#wx)\lib\gcc48_dll\mswud in searching directory for compiler and resource compiler tabs and changing $(#wx)\lib\gcc_dll to $(#wx)\lib\gcc48_dll in linker tab.

What do you think ?

-Vit

--- End quote ---

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version