Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Adding a static (.a) library to existing makefile project
Adding a static (.a) library to existing makefile project [message #1798097] Mon, 12 November 2018 12:32 Go to next message
Kamran Memon is currently offline Kamran MemonFriend
Messages: 1
Registered: November 2018
Junior Member
Hi All,

I'm working with a large C++ project that has existing custom makefiles.

I've managed to import the project into eclipse via the import 'existing code as makefile project'. The code now compiles and runs.

However, I am now trying to modify the code and want to import a static library into the project. When I try to navigate to project- C/C++ Build- Settings, I notice that there is no 'Tool Settings' and the options to link to libraries is gone.

My question is: is it possible to import a static library (.a) file to eclipse via eclipse GUI or is the only option to go in and modify the makefile myself?

Thanks,
Re: Adding a static (.a) library to existing makefile project [message #1798176 is a reply to message #1798097] Tue, 13 November 2018 15:47 Go to previous message
Tauno Voipio is currently offline Tauno VoipioFriend
Messages: 742
Registered: August 2014
Senior Member
If you have a Makefile project, you're responsible of the maintenance of the Makefile.

To link the library in, you need to add it to the files to link at the linker command, which may be a g++, gcc or ld command line.

To compile the sources to connect to the library, you need to add the header file of the library to the source includes in the relevant modules.

For instructions on Makefiles, get the GNU make manual from <https://www.gnu.org/software/make/manual/>.


--

Tauno Voipio
Previous Topic:Trying to build CDT in Eclipse IDE for Eclipse Committers
Next Topic:execute shell command cause debugger terminated
Goto Forum:
  


Current Time: Thu Apr 25 17:48:13 GMT 2024

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

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

Back to the top