newbie with a problem using ld
I have both version 4.0.1 and 4.2.2 of gcc installed in my computer just in case that matters. I'm trying to link a small test program to learn to use the linker, but the linker can't seem to find the library, even under the indication to look for it under the current directory.
I had already obtained similar errors in past ocassions, that is to say, the linker doesn't find any libs even when I think I'm indicating both the correct name and the path using the -l and -L flags, respectively. I've read the man files for both gcc and for ld, and I still can't pinpoint the error. I would really appreciate if anyone could help me out. Code:
|
When using the -l option the linker surrounds the name with "lib" and ".a ". This mean it looks for a file called libtest.a. If the library you're trying to link is testlib.a, you have to rename it as libtest.a.
|
thanks so much
right about now I am feeling pretty silly about not having noticed such a silly error, oh well, thanks a lot
|
All times are GMT -5. The time now is 06:35 PM. |