Author Topic: [solved] codeblocks 13.12 & wxWidgets 3.0 config, ld.exe cannot find -lwxmsw30u?  (Read 34437 times)

Offline Aaron

  • Multiple posting newcomer
  • *
  • Posts: 57
Quote
So you've failed to set you wx global variable and thus the path is invalid.
Settings -> Global variables -> wx -> set proper paths

Failed to set them correctly anyway. 
What additions or changes would you recommended from here.


I could not find folders for the empty fields obj, bin, cflags, and iflags.

Everything was working yesterday until I began chasing errors in one project, now I the error:
ld.exe||cannot find -lwxmsw30d_core|
« Last Edit: March 07, 2015, 05:26:36 am by Aaron2 »

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Normally, you don't need to set anything but the base-path.

Offline Aaron

  • Multiple posting newcomer
  • *
  • Posts: 57
I just finished removing all traces of wxWidgets from my problem pc, then compiled a fresh copy.

A simple new project test still produces:
ld.exe        cannot find -lwxmsw30d_core

I have his dialog at the end of the new project wizard also.
« Last Edit: March 07, 2015, 05:57:28 am by Aaron2 »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9488
Well of course you not only need the sources of wxWidgets but also the compiled libs... Compiled preferably with the target compiler of your project. Consult the wx docs how to do so.you'll also find some hints in the x::B wiki.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline Aaron

  • Multiple posting newcomer
  • *
  • Posts: 57
UPDATE

I determined that the file libwxmsw30u.a was missing from the C:\wxWidgets-3.0.2\lib\gcc_dll directory, so I copied and pasted it from another pc with wxWidgets & CodeBlocks which operates and builds as properly.

Now, this is the latest build log:
Code: [Select]
-------------- Build: Debug in 6Martest (compiler: GNU GCC Compiler)---------------

mingw32-g++.exe -LC:\wxWidgets-3.0.2\lib\gcc_dll -LC:\wxWidgets-3.0.2\lib\gcc_dll -o bin\Debug\6Martest.exe obj\Debug\_MartestApp.o obj\Debug\_MartestMain.o  obj\Debug\resource.res -mthreads  -lwxmsw30u -mwindows
Warning: .drectve `-aligncomm:"___hexdig_D2A",5' unrecognized
/mingw/lib/libmingw32.a(setargv.o):(.text+0x30): undefined reference to `___chkstk_ms'
/mingw/lib/libmingwex.a(glob.o):(.text+0x673): undefined reference to `___chkstk_ms'
/mingw/lib/libmingwex.a(glob.o):(.text+0x7e0): undefined reference to `___chkstk_ms'
/mingw/lib/libmingwex.a(glob.o):(.text+0x81d): undefined reference to `___chkstk_ms'
/mingw/lib/libmingwex.a(glob.o):(.text+0x934): undefined reference to `___chkstk_ms'
/mingw/lib/libmingwex.a(glob.o):(.text+0xb78): more undefined references to `___chkstk_ms' follow
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 9 second(s))
6 error(s), 1 warning(s) (0 minute(s), 9 second(s))

Then I realized I had an old MinGW installed im my C:\ directory, renamed it 'zz_MinGW', and the build is successful.
« Last Edit: March 07, 2015, 06:06:47 pm by Aaron2 »

Offline Raf20076

  • Single posting newcomer
  • *
  • Posts: 1
UPDATE

I determined that the file libwxmsw30u.a was missing from the C:\wxWidgets-3.0.2\lib\gcc_dll directory, so I copied and pasted it from another pc with wxWidgets & CodeBlocks which operates and builds as properly.

>:( Are you kidding me?


Sollution for cannot find -lwxmsw30ud (or lwxmsw31ud, lwxmsw32ud, lwxmsw33ud for the future)

OK! I assume that your wxWidgets 3.1.0 project is opened now in codeblocks
and before you compiled wxWidgets 3.1.0 on your computer

In menu click ->  Project -> Build options....
In Project build options window select
-> Debug (Select compiler -> GNU GCC Compiler)
In Linker settings -> (in Policy select -> Prepend target options to project options)
In Link Librarias select lwxmsw30ud and click Edit button, then change name for lwxmsw31ud click OK then again
In Link Librarias click button Add and type libshlwapi.a click OK then again
In Link Librarias click button Add and type libversion.a click OK then again

In Other link options paste

-lshlwapi
-lversion

In Project build options window select
-> Release (Select compiler -> GNU GCC Compiler)
Select Linker settings and in Link Librarias select lwxmsw30u and click Edit button, then change name for lwxmsw31u click OK

then click OK closing window

In Menu click -> Settings -> Global variables
In Global variable editor window select
In base select folder where your wxWidget is installed usually C:\wxWidgets
In include select folder inlude in your wxWidget folder, usually C:\wxWidgets\include
In lib select folder lib in your wxWidget folder usually C:\wxWidgets\lib

and that's it ;D you don't have to dig a hole using a spoon. I hope i helped





« Last Edit: October 31, 2016, 07:12:45 am by Raf20076 »