Building several excecutables in one project [message #122335] |
Sun, 03 October 2004 17:31 |
Eclipse User |
|
|
|
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 #122987 is a reply to message #122335] |
Thu, 07 October 2004 18:17 |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.03199 seconds