Installing and using cURL in Linux and use it in Eclipse as well?

0

I come from a Windows environment - I used cURL in Eclipse (C). I want to do the same in a Linux environment (Ubuntu). I followed the installation guide on how to install cURL, but how do you use cURL from Eclipse once it is installed?

Marius Claassen

Posted 2015-10-01T15:52:42.747

Reputation: 1

Update: I followed the tutorial (goo.gl/vNrYxl): I got the required include path from terminal: $ curl-config --cflags - it returned: I/usr/local/include. I included this path in Eclipse: Project Properties-> C/C++ General->Paths and Symbols->Includes Tab. I located the required libraries with $ curl-config --libs and it returned -L/usr/local/lib -lcurl. I linked the libs in Eclipse: Project Properties-> C/C++ General->Paths and Symbols->Libraries tab. (Specifically: libcurl.a). When I build the project it reports an error: "cannot find -l/usr/local/lib/libcurl.a. Ideas? – Marius Claassen – 2015-10-01T15:53:24.447

Please show us what you have entered in eclipse Libraries – Krzysztof Krasoń – 2015-10-01T16:03:47.427

Answers

2

Isn't enough to do apt-get install curl?

After that you can use it:

curl http://www.google.com

If you are more after using libcurl then you should ask in stackoverflow.com

If you install it from the source you will need to setup LD_LIBRARY_PATH to point to directory where you have libcurl.

Krzysztof Krasoń

Posted 2015-10-01T15:52:42.747

Reputation: 186

I want to access libcurl functions within eclipse and not the terminal. I can confirm that curl has been sucessfully installed in Linux. By the way, I posted the question originally on Stack Exchange, but they put it on hold and suggested Superuser... – Marius Claassen – 2015-10-01T16:00:33.453