Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Building several excecutables in one project
Building several excecutables in one project [message #122335] Sun, 03 October 2004 17:31 Go to next message
Eclipse UserFriend
Originally posted by: rasmusback.gmail.com

Hi all.

I'm taking a course in C++ programming and I'm using cdt to solve the
course excercises. I've created a managed make c++ project for the first
excercise unit, unit1, and in it one .cpp file for each of the excercises
(ex1.cpp, ex2.cpp, etc.). Each of the exN.cpp files is a small program
with a main method. My problem is that when cdt runs make for unit1 it
tries to build one excecutable from all the files (g++ -o unit1 ex1.o
ex2.o), which isn't what I want.

Is it possible to have managed make compile each .cpp file into its own
binary? Creating a new project for each excercise would leave me with ~20
projects by the end of the course.

Thanks,
Rasmus
Re: Building several excecutables in one project [message #122357 is a reply to message #122335] Mon, 04 October 2004 05:58 Go to previous messageGo to next message
Cavit Cahit VURAL is currently offline Cavit Cahit VURALFriend
Messages: 76
Registered: July 2009
Member
No :-)


Rasmus Back wrote:

> Hi all.

> I'm taking a course in C++ programming and I'm using cdt to solve the
> course excercises. I've created a managed make c++ project for the first
> excercise unit, unit1, and in it one .cpp file for each of the excercises
> (ex1.cpp, ex2.cpp, etc.). Each of the exN.cpp files is a small program
> with a main method. My problem is that when cdt runs make for unit1 it
> tries to build one excecutable from all the files (g++ -o unit1 ex1.o
> ex2.o), which isn't what I want.

> Is it possible to have managed make compile each .cpp file into its own
> binary? Creating a new project for each excercise would leave me with ~20
> projects by the end of the course.

> Thanks,
> Rasmus
Re: Building several excecutables in one project [message #122987 is a reply to message #122335] Thu, 07 October 2004 18:17 Go to previous message
Eclipse UserFriend
Originally posted by: lothar.xcerla.com

Rasmus Back wrote:

> Hi all.
>
> I'm taking a course in C++ programming and I'm using cdt to solve the
> course excercises. I've created a managed make c++ project for the first
> excercise unit, unit1, and in it one .cpp file for each of the excercises
> (ex1.cpp, ex2.cpp, etc.). Each of the exN.cpp files is a small program
> with a main method. My problem is that when cdt runs make for unit1 it
> tries to build one excecutable from all the files (g++ -o unit1 ex1.o
> ex2.o), which isn't what I want.
>
> Is it possible to have managed make compile each .cpp file into its own
> binary? Creating a new project for each excercise would leave me with ~20
> projects by the end of the course.
>
> Thanks,
> Rasmus

Yes, it is if you use my SCons Builder Plugin. The only requirement is that
you need a subdirectory for each executable. You can get the plugin at
http://nic-nac-project.de/~lothar/eclipse/update/SConsBuilde rPlugin.html

If you like my plugin, please rate it at
http://eclipse-plugins.2y.net/eclipse/plugin_details.jsp?id= 816

Lothar
Previous Topic:CDT2.o
Next Topic:gdb timeout problems on launch
Goto Forum:
  


Current Time: Thu Dec 26 17:04:25 GMT 2024

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

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

Back to the top