In Mac How To Add External Library In Eclipse Project

Eclipse

In Mac How To Add External Library In Eclipse Project Management

Open eclipse → right click on the project and go to property → Build Path → Configure Build Path and add the testng-6.8.jar in the libraries using Add External Jar button. We assume that your Eclipse has inbuilt TestNG plug-in; if it is not available, then please get the latest version using the update site.

Home » Language IDEs » C / C++ IDE (CDT) » In mac how to add external library in eclipse project managementImport External C++ Library[noob]
Show:Today's Messages::Show Polls::Message Navigator
Import External C++ Library[noob][message #638144]Wed, 10 November 2010 08:02
Ethan Wessel
Messages: 10
Registered: May 2010
Hello, I'm having trouble importing an external C++ lib into one of my projects. I have no idea how to go about this and have searched the forums for about 1.5 hours now =/ What steps do I need to take. Please if possible be as detailed as you can. Much appreciated.
If additional information is required ask and i'll do my best to provide.
-E
Re: Import External C++ Library[noob][message #638151 is a reply to message #638144]Wed, 10 November 2010 08:31
David
Messages: 9
Registered: November 2010
In general you use the menu File->Import to import files to your project.
But you are not informative enough.
Do you import the librarys c++ files to a broject with the purpose to build the library under eclipse? If so I suggest that you create a project specific for the library.
Re: Import External C++ Library[noob][message #638154 is a reply to message #638151]Wed, 10 November 2010 08:44
Ethan Wessel
Messages: 10
Registered: May 2010
Well I have a graphics library that I'm wanting to use, but I dont necessarily understand how I include the library; I dont know how to set up the IDE so it uses the library.
I hope that's clearer.

[Updated on: Wed, 10 November 2010 18:42]

Re: Import External C++ Library[noob][message #638388 is a reply to message #638154]Thu, 11 November 2010 07:35
Axel Mueller
Messages: 1973
Registered: July 2009
see http://wiki.eclipse.org/CDT/User/FAQ#Adding_C.2FC.2B.2B_Exte rnal_Libraries
Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: Import External C++ Library[noob][message #638392 is a reply to message #638388]Thu, 11 November 2010 07:48
Ethan Wessel
Messages: 10
Registered: May 2010
Thank you. Idk why I wasn't able to find this earlier. But I agree I will search harder next time. Thanks again
Re: Import External C++ Library[noob][message #638654 is a reply to message #638388]Fri, 12 November 2010 00:41
Ethan Wessel
Messages: 10
Registered: May 2010
Alright, so I tried to follow the direction in the link you provided. However, they did not work.
There is no directories tab under the C/C++ build > settings tools settings tab.
I tired the second method under the C/C++ build > settings > tool settings > C++ linker > miscellaneous - no results.
The third method C/C++ build > settings > C++ linker > libraries - no results
Here's what i did, but I still got a compiler error...
I went to C/C++ build > settings > tool settings > C++ compiler > includes
this seems to do the trick, but i'm guessing the library is non compatible with a mac. I will try another library and see what happens.
Re: Import External C++ Library[noob][message #638671 is a reply to message #638654]Fri, 12 November 2010 04:56
Ethan Wessel
Messages: 10
Registered: May 2010
Ok I tried something else this time.
I went under the properties of my project > C/C++ General > Paths and Symbols. Under Paths and Symbols there are many tabs consisting of: Includes, Symbols, Libraries, Library Paths, Source Location, and References.
Can somebody please tell me if this is the correct area in which I add external libraries to?
I tested it out and It didn't give me any problems with the adding library part, but when I went to use the libraries in my main it did not work.
Re: Import External C++ Library[noob][message #638683 is a reply to message #638671]Fri, 12 November 2010 07:54
Axel Mueller
Messages: 1973
Registered: July 2009
Goto C/C++ build > settings > tool settings > C++ linker-> Libraries
In the top pane click add and add the name of your lib, e.g. 'My' if your lib is named MyLib (you must omit the trailing lib, the linker will add it by himself).
In the bottom pane you must specify the path to the external lib.

Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Previous Topic:Implement method broken?
Next Topic:How can I issue GDB commands?
Goto Forum:
-=] Back to Top [=-

Current Time: Fri Apr 10 16:57:34 GMT 2020

In Mac How To Add External Library In Eclipse Project Ideas

Powered by FUDForum. Page generated in 0.02271 seconds

In Mac How To Add External Library In Eclipse Projects

Home » Language IDEs » C / C++ IDE (CDT) » Arduino Library Management With Symlinks(How is the library directory implemented, and is there a way to make the Arduino plugin access external libraries with symbolic links?)
Show:Today's Messages::Show Polls::Message Navigator
Arduino Library Management With Symlinks[message #1775041]Tue, 24 October 2017 02:39
Isaac Rex
Messages: 2
Registered: October 2017
I have recently decided that I want to start developing for Arduino in a more complete IDE. I use Eclipse for my college Java class, and I have grown rather fond of it. I am using the CDT Arduino plugin, but I have a problem with managing my Arduino libraries. What I would ultimately like to do is maintain one libraries folder in my Arduino directory, and have Eclipse link to that same folder.
The Arduino plugin for Eclipse keeps its libraries in ~/.arduinocdt/libraries/, so I had the idea of creating a symbolic link in ~/.arduinocdt/ named 'libraries' and linking it to my Arduino libraries directory. This does not work. Eclipse simply won't load the libraries if they're in the form of a symbolic link. I did find that it works if I hard link /Arduino/libraries/ to ~/.arduinocdt/libraries/, but it seems that hard linking directories is generally discouraged, and I would like to avoid this solution.
So my question is simply, is this possible? Can I maintain my libraries in /Arduino/libraries/ and have Eclipse refer to that folder? A solution that does work is to keep my 'real' libraries folder in ~/.arduinocdt/libraries/ and symlink to that directory in /Arduino/libraries/ (the Arduino IDE is perfectly happy using a symlink) but I would really like to go the other way.
How To Use Custom or External Libraries
This is a decidedly unintuitive process, and there seems to be a lot of confusion on how to do it, so I thought I would share what worked for me.
I mentioned above that the Arduino Eclipse plugin keeps its libraries in ~/.arduinocdt/libraries/ (on Mac). Adding a library is almost as simple as copying the library folder in to that directory, just as you would for the Arduino IDE (if you have no libraries installed already, you will need to make the 'libraries' folder).
The one extra thing you need is a 'library.properties' file inside your library's folder. I've included the one I used for my Debounce library bellow to use as a template. Your final path should look something like ~/.arduinocdt/libraries/yourLibrary/ and inside this directory you will have your .h, .cpp, library.properties, and anything else your specific library may depend on.
Once you have your library in this directory, restart Eclipse and it should show up in the Arduino Downloads Manger. From here, you add them to your project as if they were a library you downloaded from the manager.
This is (more or less) what the contents of the library.properties file should look like. You can create it with any text editor.
Re: Arduino Library Management With Symlinks[message #1793043 is a reply to message #1775041]Mon, 30 July 2018 00:04
Paulo Borges
Messages: 4
Registered: July 2018
Hi, I have followed your instructions carefully to:
How To Use Custom or External Libraries
Use custom Arduino libraries in Eclipse.
After I restart Eclipse the library I copied (unzip from Github) into the C:UsersEclipse.arduinocdtlibraries in my case:
C:UsersEclipse.arduinocdtlibrariesMemoryFree
and added the library.properties with the following content:
name=MemoryFree
version=1.0
author=Irex
maintainer=Irex
sentence=Arduino library MemoryFree
paragraph=Abstracts functionality Memory
category=Memory
url=*
architecture=*
The new library shows at the library download manager but when I #include <MemoryFree.h> on my code it reports unresolved include.
What I am doing wrong?
Thanks
Paulo
Re: Arduino Library Management With Symlinks[message #1793051 is a reply to message #1775041]Mon, 30 July 2018 09:54
Paulo Borges
Messages: 4
Registered: July 2018
Just did a clean install of Eclipse Photon.
Same problem, Unresolved include.
See picture.
By the way, Windows locale settings are for Portuguese/Brazil
Thanks
Paulo
  • Attachment:EclipseArduino.png
    (Size: 47.88KB, Downloaded 5817 times)
Re: Arduino Library Management With Symlinks[message #1793134 is a reply to message #1793051]Tue, 31 July 2018 13:20
Isaac Rex
Messages: 2
Registered: October 2017
It appears that you're doing it correctly. I haven't tried this on Photon yet; I've been using Oxygen. Is MemoryFree the only external library you've added? Can you try added a different one to see if it works?
Re: Arduino Library Management With Symlinks[message #1793178 is a reply to message #1793134]Wed, 01 August 2018 02:39
Paulo Borges
Messages: 4
Registered: July 2018
Dear Isaac, thanks for the response.
I kept trying and found how to sort it out.
Indeed it is not intuitive at all.
What did I do:
Install Eclipse as per instructions in the following video (even if it is not Photon)
https://www.youtube.com/watch?v=TtPvkPpAx0E
Copy library folder to:
C:UsersUSERNAME.arduinocdtlibraries
Library MUST include file library.properties as following example:
name=LibraryName
version=1.0
author=John_Smith
maintainer=Andrew_Smith
sentence=MemoryStatus
paragraph=MemoryStatus.
category=MemoryStatusurl=https://github.com/XXX/12345
architectures=*
includes=*
I used Windows Notepad and all the above appears in a single line, no spaces, no CR/LF at the end, replace example labels with proper from the library
(some libraries at Github include the library.properties file
To build your own try to look on built in library folder and see how the file library.properties looks.
Right click project, select properties/Libraries
Confirm (click) every library that must be included in the project
Regards
Paulo

[Updated on: Wed, 01 August 2018 02:40]

Re: Arduino Library Management With Symlinks[message #1823042 is a reply to message #1793178]Wed, 18 March 2020 15:19
Andrea Sperandio
Messages: 1
Registered: March 2020
I want to thank you in advance for your post.
I've just faced the same symlink problem in Windows and I've solved it this way:
go to ....arduinocdtlibraries and create a Junction:
Previous Topic:float type works with Keil but not with Eclipse
Next Topic:Build Output Parser - no rebuild
Goto Forum:

In Mac How To Add External Library In Eclipse Projector


[ Syndicate this forum (XML) ] [ ]

In mac how to add external library in eclipse projects
Powered by FUDForum. Page generated in 0.02477 seconds