Reputation: 23
I dont want to randomly place libraries in arbitrary order hoping I get the order correct. Is there a systematic way to determine the linker library order in eclipse cdt?
ERROR: cannot find -l{some project}
Upvotes: 1
Views: 306
Reputation: 33589
You are correct saying that -l
directives must follow a certain order. However, this error means a different thing. The linker simply failed to find the library file you have specified. Perhaps, you're missing the -L
directive which specifies the folder where the linker looks for the library files. E. g.
-L../bin -l{libname}
Upvotes: 1
Reputation: 614
Ok as long as you got "can not find -lsomething. You should put libsomething.so (or.dll or .a etc, the library) in a directory of your choice and the tell the compiler to look at this directory with compiler flag
-L/path/to/libsomething
Note that the -L flag tell the compiler where to look for libraries and the -l (lowercase) tell it to actaly link the library, so you must provide a path to the former and a library name to the later.
Upvotes: 0