Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » include an external library(include an external library)
include an external library [message #1785814] Fri, 20 April 2018 08:38 Go to next message
se he is currently offline se heFriend
Messages: 3
Registered: April 2018
Junior Member
Hi,

I hope i am right here.

I work with ubuntu and eclipse CDT. I want to include an external library (https://github.com/frankaemika/libfranka) i downloaded it and want to work with it. I can use the examples in the lib, but i want to build my own project.

I created an empty project in eclipse and want to include the lib like this:
properties - c/c++ build - settings - tool settings - cross g++ linker - libraries and there i include the path in Library search path (-L) but nothing happens.
Re: include an external library [message #1785907 is a reply to message #1785814] Mon, 23 April 2018 03:54 Go to previous messageGo to next message
David VavraFriend
Messages: 803
Registered: October 2012
Senior Member
The library path is used when searching for a library.
You still have to tell the linker to look for it.
Use -lxxx (small L).
This only works if the library name is libxxx.a or libxxx.so
NOTE: with the linker libraries dialog, Eclipse will insert the -L and -l for you.


Otherwise, you'll have to include it (full path and name) as an Other Object.

index.php/fa/32669/0/

[Updated on: Mon, 23 April 2018 04:07]

Report message to a moderator

Re: include an external library [message #1786297 is a reply to message #1785907] Mon, 30 April 2018 11:59 Go to previous messageGo to next message
se he is currently offline se heFriend
Messages: 3
Registered: April 2018
Junior Member
thank you for your answer.

I can't find any .lib oder .a files.
This is the source-code of the library (https://github.com/frankaemika/libfranka). After downloading i create a build directory und built it.
I tried it with properties- c/c++build - settings - cross g++ compiler - include - home/system/libfranka/include/franka/. after that i have built the projekt . the includes are not labeled anymore in my Code, but in Debug - src - subdir.mk is an error: file or directory not found




Re: include an external library [message #1786570 is a reply to message #1786297] Mon, 07 May 2018 13:04 Go to previous messageGo to next message
se he is currently offline se heFriend
Messages: 3
Registered: April 2018
Junior Member
i include the lib:

C/C++ Build - Settings Cross GCC Compiler - Includes and there: Include path (-I) "the path of the headers
C/C++ Build - Settings Cross G++ Linker - Libraries: Libraries: -lfranka and Library search path (-L)

that is one of the error messages: How can i fix this?
/home/system/libfranka/include/franka/duration.h:235:45: note: C++11 'noexcept' only available with -std=c++11 or -std=gnu++11

Re: include an external library [message #1786582 is a reply to message #1786570] Mon, 07 May 2018 21:53 Go to previous message
David VavraFriend
Messages: 803
Registered: October 2012
Senior Member
You are trying to use a feature found in C++11 or later.
Specifically. 'noexcept'.
Either change the dialect in the tool settings
or remove the use of the feature.
Previous Topic:Unusually complicated Content Assist
Next Topic:about thte include function of C++compile
Goto Forum:
  


Current Time: Tue Nov 13 04:44:56 GMT 2018

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

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

Back to the top