Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Project Build Configurations Question(Question on Build Configurations)
Project Build Configurations Question [message #1849922] Tue, 08 February 2022 15:11 Go to next message
Erik Sanabria is currently offline Erik SanabriaFriend
Messages: 1
Registered: February 2016
Junior Member

I have a medium sized C++ Linux project with a couple of Classes which are currently building staticly and all integrated in the same executable.
I am using Eclipse Managed Build on Ubuntu 20.04 64-bits version Eclipse IDE for C/C++ Developers (includes Incubating components) Version: 2021-12 (4.22.0)

I want to be able to configure my project to compile each Class to it's own shared library so it is dynamicaly linked with the main executable to reduce it's size.

How can I go about this?

Thank you so much,
Re: Project Build Configurations Question [message #1849941 is a reply to message #1849922] Wed, 09 February 2022 09:29 Go to previous message
Tauno Voipio is currently offline Tauno VoipioFriend
Messages: 739
Registered: August 2014
Senior Member
There is nothing to win if the classes are not going to be used with other executables.

A dynamic library is actually a specially-formatted executable with externally visible linkages to entry points. It needs to be compiled differently compared to a normal executable, to get position-independence needed for sharing. The position-independence needs some expansion of the code.

The total size of your excutable and the shared-library classes will be more than the monolithic statically-linked program.


Tauno Voipio
Previous Topic:Configuration of GDB
Next Topic:How to use math.h in Eclipse with gcc?
Goto Forum:

Current Time: Sun Feb 05 15:47:34 GMT 2023

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

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

Back to the top