User forums > Help

Linker can't find my lib file, what's wrong ?

(1/2) > >>

keyser:
My project is

F:\utility\utility.cbp

And I put one of my own lib file(container.a) to:

F:\utility\bin\lib\

So that the lib file is:

F:\utility\bin\lib\container.a

I have a build target named "Test", it's build a .exe which is linking to container.a

I add "F:\utility\bin\lib\" to "Search directories -> linker" in Build options

I add "container.a" to "Linker settings -> Link libraries" in Build options

But this doesn't work.

the error is :

ld.exe||cannot find -lcontainer.a|
||=== Build finished: 1 errors, 0 warnings ===|

why ?

thomas:
Drop the .a extension ("container"), or provide a full, absolute path. MinGW wants one or the other, no thing in between.

dje:
I'm between and it works !
libwxmsw28u.a in the Link libraries
C:\wxWidgets-2.8.8\lib\gcc_dll in the linker search directories

EDIT: I use gcc version 3.4.5 (mingw-vista special) on XP SP2.

Did you specify your options to the right project /build target ?

Dje

MortenMacFly:

--- Quote from: dje on July 17, 2008, 02:25:14 pm ---I'm between and it works !
libwxmsw28u.a in the Link libraries

--- End quote ---
You are not. Notice the "lib" prefix? That's what's missing below. That's why it is not working and Thomas is right.

keyser:

--- Quote from: thomas on July 17, 2008, 02:22:45 pm ---Drop the .a extension ("container"), or provide a full, absolute path. MinGW wants one or the other, no thing in between.

--- End quote ---

I drop the ".a" extension, but it still doesn't work.

Navigation

[0] Message Index

[#] Next page

Go to full version