User forums > Help

wxWidgets 2.6 (MSW, GCC) installation instructions

<< < (9/29) > >>

Serge2005:
Hello friends, I am newbei in CodeBlocks, so I can't compile wxWidgets application...
I compiled wxWidgets 2.6.1 successfully, but when I try compile in CodeBlocks "New project->wxWidgets Application", I got message "ld.exe cannot find -lwxmsw"
I have this compiler log:
+++++++++++++++++++++++++++++++++++++++++++++++
Project   : wxWidgets application
Compiler  : GNU GCC Compiler (called directly)
Directory : C:\Proj\CODEBLOCKS\wxW\
--------------------------------------------------------------------------------
Switching to target: default
Compiling: main.cpp
Linking executable: C:\Proj\CODEBLOCKS\wxW\wxWidgets.exe
C:\Program Files\CodeBlocks\bin\..\lib\gcc\mingw32\3.4.4\..\..\..\..\mingw32\bin\ld.exe: cannot find -lwxmsw
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 3 seconds)
1 errors, 0 warnings
++++++++++++++++++++++++++++++++++++++++++++++++++
I have  Code::Blocks 1.0-RC1
Please tell me what do I do wrong?
Thank you in advance.

Serge2005:
oh.. I'm sorry I forgot to say...  :D
I have wxWidgets 2.6.1 installed so..  C:\wx
In Compiler Options->Directories->Compiler I added "C:\wx\include"
In Compiler Options->Directories->Linker I added "C:\wx\lib\gcc_lib"

mandrav:
Just go to your project's link libraries and edit wxmsw to wxmsw261, or what have you (look for c:\wx\gcc_lib\libwxmsw261.a, for example)...

Serge2005:
Thank you mandrave for your quick reply...
I am very ashamed for my dullness, but I have no "libwxmsw261.a" in "C:\wx\lib\gcc_lib" directory
and I have no one in "C:\wx" at all.
There are these files in "C:\wx\lib\gcc_lib":
libwxbase26.a
libwxbase26_net.a
libwxbase26_xml.a
libwxbase26d.a
libwxbase26d_net.a
libwxbase26d_xml.a
libwxexpat.a
libwxexpatd.a
libwxjpeg.a
libwxjpegd.a
libwxmsw26_adv.a
libwxmsw26_core.a
libwxmsw26_html.a
libwxmsw26_media.a
libwxmsw26_xrc.a
libwxmsw26d_adv.a
libwxmsw26d_core.a
libwxmsw26d_html.a
libwxmsw26d_media.a
libwxmsw26d_xrc.a
libwxpng.a
libwxpngd.a
libwxregex.a
libwxregexd.a
libwxtiff.a
libwxtiffd.a
libwxzlib.a
libwxzlibd.a

I'v done try to link every file, but had same failure.  :(
I lost myself in this issue  :( :(

rickg22:
AHHHHH you need to build your wxwidgets library using the MONOLITHIC=1 flag.

that would give you a single libwxmsw26.a. And if you build using SHARED=0 (besides the MONOLITHIC=1), you'll have the statically linkable libwxmsw.a.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version