User forums > Help

Problem with linking libraries

(1/3) > >>

rem:
When i create new project with static wxWidgets library the code::blocks doesn't generate the exe file, the compilers gives me the message:

Project   : Project1
Compiler  : GNU GCC Compiler (called directly)
Directory : C:\Dev-Cpp\Projects\3\
--------------------------------------------------------------------------------
Switching to target: default
Compiling: myapp.cpp
Compiling: main.cpp
Linking executable: C:\Dev-Cpp\Projects\3\Project1.exe
C:\Program Files\CodeBlocks\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe: cannot find -lwxmsw26 -lwxmsw26_gl -lwxtiff -lwxjpeg -lwxpng -lwxzlib -lwxregex -lwxexpat -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 44 seconds)
 
I really don't know why, I added to the linker options all libraries

-lwxmsw26 -lwxmsw26_gl -lwxtiff -lwxjpeg -lwxpng -lwxzlib -lwxregex -lwxexpat -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32

But still without effect, then I changed the libraries to the path, like below:

C:\Dev-Cpp\lib\libwxmsw26.a ... and all other

And still nothing, any sugestions, thank you very much for any.

rickg22:
hmmmmmmmm what version of Code::Blocks are you using? (Did you grab it from CVS or just downloaded it from the web?

Second, did you install the wxWidgets (NOT included in Code::Blocks) ?

Anonymous:
"hmmmmmmmm what version of Code::Blocks are you using?"
1.0 final beta

"Did you grab it from CVS or just downloaded it from the web?"
I downloaded it from
http://www.codeblocks.org/modules.php?op=modload&name=Downloads&file=index

"Second, did you install the wxWidgets (NOT included in Code::Blocks) ?"
Yes, I did, I used Dev-cpp, but I wanted to change it to Code::Blocks

rem:
The last submit it was me. rem.  :lol:

mandrav:
Post the *full* compile log. Enable it in "Compiler->Compiler options->Other->Compiler logging".
The error says it can't find the libs. Have you added the correct directories???

Yiannis.

Navigation

[0] Message Index

[#] Next page

Go to full version