Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » I want to know how to know -l name.
I want to know how to know -l name. [message #1727741] Sat, 26 March 2016 11:42 Go to next message
youngbin Hyun is currently offline youngbin HyunFriend
Messages: 5
Registered: March 2016
Junior Member
cannot find -IDinamixel
make: ***[cross gcc] Error 1
recipe for target 'cross gcc' failed

I use the eclipse in raspbian based on linux.

1. when I push the build button, I get the error message. In my opinion, this message means 'cannot find Dinamixel libaray'. I don't know how to know libaray's name. there are just some hearder file. I want to use <Dynamixel.h>. Can you tell me?? I attach a file including the headerfile.

2. and what is the 'makefile'?? when I add libarary, Should I also add 'makefile'??

I downloaded the file from www.robotis.com/en

Re: I want to know how to know -l name. [message #1727763 is a reply to message #1727741] Sun, 27 March 2016 01:08 Go to previous message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
-Ixxx means use libxxx.a or -libxxx.so depending on whether you are using static or dynamic librairies.

Yes, it means libDinamixel.* can't be found. The normal place for it varies but (in linux at least) it is usually /usr/lib or /usr/local/lib. Where it is depends on whether you actually downloaded it and where you put it.

Assuming Linux, If it was installed as a package by rpm or apt-get or yum you can use pkg-config for the flags needed for compiling and linking. But, specifically, you would use the -L<path> to tell the linker where the library you are going to use (in the -l<xxx>) is actually located.

You would then use the tool settings (found under Project--> Properties --> C/C++ Build --> Settings on the Tool Settings tab) to tell Eclipse to include them in the makefile.

The makefile is the file generated by you or Eclipse/CDT to tell the program make the rules for creating your build. The fact that you asked what it is indicates you are the very low on the learning curve. One has to start somewhere but Eclipse/CDT assumes you really know how to use make and GCC to build executables. That they fail to disclose this is perhaps unfair to new users. In any case, you should stidy up on how to create executables using make and GCC. Google "using make linux" (use your system name) for some tutorials. Eclipse/CDT can create the makefile for you but it will remain a mystery what is going on if you don't understand the basics.

[Updated on: Sun, 27 March 2016 01:27]

Report message to a moderator

Previous Topic:Hooking into the indexer
Next Topic:Including a rapidxml library Eclipse CDT
Goto Forum:
  


Current Time: Tue Mar 19 07:19:32 GMT 2024

Powered by FUDForum. Page generated in 0.02312 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top