C++ Learning Community Forum
August 01, 2010, 03:04:14 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Hello. Smiley
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Library madness (or maybe I'm blind??)  (Read 511 times)
AJ Peacock
N00b!!1
*
Posts: 2


View Profile
« on: February 10, 2010, 03:09:33 PM »

I'm pretty new to using Eclipse and it's driving me crazy.

I'm trying to compile/link a VERY simple curl example and the linker keeps telling me:

make all
Building target: test-cpp
Invoking: GCC C++ Linker
g++ -L/usr/lib -o"test-cpp"  ./libcurl-example.o   -llibcurl
/usr/bin/ld: cannot find -llibcurl
collect2: ld returned 1 exit status
make: *** [test-cpp] Error 1


I've added /usr/lib to the -L path for the project as you can see in the g++ line above.  I've also added libcurl to the -l path.

A directory listing of /usr/lib is shown below:

$ ls -la /usr/lib | grep curl
lrwxrwxrwx  1 root root      16 2009-12-30 14:03 libcurl.so -> libcurl.so.4.1.1
lrwxrwxrwx  1 root root      16 2009-12-30 14:03 libcurl.so.4 -> libcurl.so.4.1.1
-rwxr-xr-x  1 root root  329988 2009-11-26 14:02 libcurl.so.4.1.1


Any ideas?  I really like the Eclipse environment and I don't think it's related to Eclipse, as the g++ command behaves the same when I do it directly from the command line.

I'm sure it's something simple that I've overlooked, but I'm just not seeing it.

I'm using Fedora 12. 64bit

Thanks in advance,
AJ
Logged
AJ Peacock
N00b!!1
*
Posts: 2


View Profile
« Reply #1 on: February 10, 2010, 03:36:29 PM »

found it after a cup of coffee.

should have been -lcurl instead of -llibcurl   duh?Huh


thanks,
AJ
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!