Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Is it possible to generate libs and app from the same project?
Is it possible to generate libs and app from the same project? [message #1844269] Tue, 07 September 2021 15:44 Go to next message
Manuel Malagon is currently offline Manuel MalagonFriend
Messages: 81
Registered: December 2011
Member
I have a project that needs multiple libraries in order to generate the application. I'm wondering if it is possible to create one project in which I compile and generate the libs and then after the libs have been generated I compile and link the application using the libraries.

I have two thoughts in mind and I don't know which, if any, is possible.

1. Create one separate project for each library and one for the application and then using some config or mechanism in eclipse to "chain" them all together so that the compilation and library generation is triggered from the application but performed before the application compilation and linking.

2. Create one single project with all the code, this is the application code folder as well as the libraries code folders, and then using a config or eclipse mechanism to compile and generate the libs first and then the application.

Is something like this possible? Or do I just have to manually generate the libs first and then the application?

I know that I can do some pre-compilation trickery along with some bash scripting to make this happen but I'm wondering if there is a "formal" or "official" way of doing this using eclipse configurations or mechanisms.
Re: Is it possible to generate libs and app from the same project? [message #1844286 is a reply to message #1844269] Wed, 08 September 2021 07:01 Go to previous message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
Eclipse Managed Build projects are restricted to one build target.
You can link to the project containing the library from a client
but you can't easily link from a library project to multiple clients.
That means if you change the library you generally have to manually build all of its clients.

You can do pretty much whatever you want with a Makefile project.
That's mostly what I use.
I found that shoehorning a Managed Build project for multiple targets isn't worth the effort.

[Updated on: Wed, 08 September 2021 07:02]

Report message to a moderator

Previous Topic:Nios II Software Build Tools for Eclipse
Next Topic:Unknown Referenced Nature
Goto Forum:
  


Current Time: Thu Mar 28 17:38:29 GMT 2024

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

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

Back to the top