C++ Learning Community Forum
August 01, 2010, 03:04:14 AM
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
: Hello.
Home
Help
Search
Login
Register
C++ Learning Community Forum
>
General C++ Programming
>
C++ in General
>
Library madness (or maybe I'm blind??)
Pages: [
1
]
« previous
next »
Print
Author
Topic: Library madness (or maybe I'm blind??) (Read 511 times)
AJ Peacock
N00b!!1
Posts: 2
Library madness (or maybe I'm blind??)
«
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
Re: Library madness (or maybe I'm blind??)
«
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?
thanks,
AJ
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General C++ Programming
-----------------------------
=> C++ Help
===> C Programming
=> C++ Tips
=> C++ in General
=> 3rd Party Libraries Programming
-----------------------------
Platform Specific Programming
-----------------------------
=> Windows
=> Linux
=> DirectX
=> OpenGL
-----------------------------
C++ Creations
-----------------------------
=> Finished Products
=> Work in Progress
-----------------------------
Resources
-----------------------------
=> Recommended Resources
=> Bookworm's Corner
===> Accelerated C++: Practical Programming by Example
===> Code Complete
-----------------------------
Other than C++....
-----------------------------
=> Off Topic
=> Other Programing Languages
===> ASM Programming
=> Computer Lab
=> The Community
Loading...