cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Curl on Eclipse Indigo - GCC C++ Compiler versus GCC C++ Linker

From: Lars Nilsson <chamaeleon_at_gmail.com>
Date: Thu, 1 Sep 2011 10:23:31 -0400

On Thu, Sep 1, 2011 at 9:35 AM, Demetrio Car <demetrio.pepi_at_gmail.com> wrote:
> Why, in Eclipse Indigo, do I have to include -lcurl in Miscellaneous
> property?

Welcome to C/C++ development.

> In Eclipse Indigo, I surf to Properties>>C/C++ Build>>Settings>>GCC C++
> Linker >> Miscellaneous >> Other Options (-Xlinker [option]), and I typed
> -lcurl? I am new in C++ and I have used Eclipse only for Java until one
> month ago. I spent long hours to start using Boost and now I spent more time
> to start using Curl. And soon I will need to use log4cpp and some more
> libraries. I was just trying to do a simple example. Now I am able to
> include both libraries but I have no idea what I have done. I just followed
> some suggestions but it took me long hours trying other suggestions before,
> even from official site.

Sounds like you need to gain general development knowledge, both
regarding how to compile and link programs in general, and how to use
your development tool, eclipse, neither of which this mailing list is
really intended for.

> It would be nice if I understood how to add some libraries without lost
> hours. About Boost, I did a very different way. I surfed Properties>>C/C++
> Build>>Settings>>GCC C++ Compiler >> Includes and I wrote
> /usr/local/boost_1_47_0/ and, later, /usr/local/curl-7.21.7/. I noted that,
> after this, I could hold control key and clicked on variable type that
> Eclipse would be guide to proper file.h from boost or curl. But I only get
> the build code after I surfed Properties>>C/C++ Build>>Settings>>GCC C++
> Linker >> Libraries and I wrote on Libraries (-l) boost_system and
> boost_filesystem and, on Library Search Path (-L) I wrote
> /usr/local/boost_1_47_0/libs. Why I put -lcurl on Miscellaneous but, about
> boost, I put boost_system and boost_filesystem on Libraries? I tried follow
> similar way to curl as I did for boost, but it doens't work.
> Thanks in advance,
> Demetrio

Boost is (as far as I know), completely contained in header files.
There are no libraries to link, in contrast to a majority of C/C++
libraries (including libcurl).

Lars Nilsson

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-09-01