Philmac |
10-13-2010 04:21 PM |
/usr/bin/ld: cannot find -lfoo when trying to compile
Hello,
I'm trying to compile a program in Fedora 9 2.6.27.25-78.2.56.fc9.x86_64 and I get the following errors:
Code:
g++ -o"test" ./sample1.o -lfoo -lbar
/usr/bin/ld: skipping incompatible /usr/local/lib/libfoo.a when searching for -lfoo
/usr/bin/ld: cannot find -lfoo
collect2: ld returned 1 exit status
make: *** [test] Error 1
I've tried to compile in both Eclipse and using the makefile I was provided and I get the exact same errors both ways. libfoo.a and libbar.a do exist and are in /usr/local/lib/ and I have executed ranlib on both of them. I also don't know what to make of "skipping incompatible"; I'm new to Linux and am not a programmer by trade so I am completely unfamiliar with this type of error. After some Googeling I found solutions ranging from "just ignore it, it doesn't matter" to needing to install missing devel packages.
Any ideas?
Thanks in advance
|