Linking LibCurl - Help

closed account (18hRX9L8)
Hi, I'm trying out this new library called LibCurl so I can get the HTML code from a website page. When I am trying to run a tutorial program, it gives me a bunch of "undefined reference link" errors. So, I searched up online about linking the LibCurl library. The problem is, all the answers to this problem are so vague, that it confuses me even more. The tutorial uses $ ... but I have no idea where my directory ($) should be. Furthermore, they say I should link using my compiler, but I have no idea where my compiler is, I just have the application for the IDE.

Here is some information:
I have downloaded the LibCurl libraries and put it in my include folder.
I am using TDM-GCC 4.6.1 as my compiler.
I am using Orwell Dev C++ 5.4.1 as my IDE.
I am a total beginner in o files, a files, anything other than .h/.hpp and .c/.cpp files.
I have no idea how to use command line to link.

Please do not link me to the tutorial, as that does not help. A step by step process would be great, and it would help way more people than me because linking seems to be a programming hot-topic.

Thank you,
programmer *Usandfriends;
first step.

how did you install libcurl ? I hope you didnt just put the source or zip/gzip file somewehre in the include folder ?

Edit: which platform/OS your using ?

your compiler is GCC 4.6.1.
Last edited on
closed account (18hRX9L8)
I am using Win7.
I installed LibCurl by downloading the zip file, unzipping it, and putting it in my include folder.
Which package did you download?
closed account (18hRX9L8)
http://curl.haxx.se/download/curl-7.29.0.zip
That is a source package, you have to build it.
closed account (18hRX9L8)
Exactly. How do I build and link it?
Last edited on
Use Cmake to generate makefiles for building libcurl.
http://www.cmake.org/

If you want to use libcurl with zlib or SSL support then you need zlib and/or OpenSSL libraries too and proper environment variables set up for Cmake to find them.

To build OpenSSL you need ActivePerl.
closed account (18hRX9L8)
There are a bunch of .cmake files already, so i think they already built cURL. I figured out how to link libraries, but which libraries do I like, and I cannot find .o or .a files...

Thank you modoran, naraku9333, writetonsharma, but if someone could please download the library and link it themselves and write down the steps, that would be very helpful.

As they say, a way to learn is by watching first, then trying it out.

Ignore:
http://www.cs.swarthmore.edu/~newhall/unixhelp/howto_C_libraries.html
Last edited on
You don't have to compile libcurl.

windows binaries can be downloaded from multiple sources. I think some of the development package will work for you (Win32 - MSVC or Win64 - MinGW64 devel packages).

http://curl.haxx.se/download.html

add the library and include paths in your compiler and you should be good.
Last edited on
closed account (18hRX9L8)
Thanks, did not see that.
Topic archived. No new replies allowed.