How do I include easily new libraries [message #721321] |
Thu, 01 September 2011 13:17 |
|
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.
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
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04116 seconds