Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » multiple main programs in a C project
multiple main programs in a C project [message #143758] Thu, 21 April 2005 00:00
Eclipse UserFriend
Originally posted by: list.eclipse.newgenesys.com

How can I have multiple C programs compile independently from each others in
one C project sharing some common object files. Right now, Eclipse only
wants to compile one executable named after the project linked with all .o
in the directory. I tried to sub-divide by subdirectories to no avail.

I think my mistake was to create a project as a managed make C project. How
do I revert to using an external Makefile? Or is there somewhere a setting
that would allow me to do what I want?

Here is my directory structure

myproject
myproject.c
myutil.c
myutil.h
test/
myproject-test.c

myproject.c and myproject-test.c have main functions.
myutil.c should compile to a .o
myutil.h is included in myproject.c and myproject-test.c

I would like to have 2 binaries, myproject and myproject-test

Thanks in advance for your help

Regards

Pascal
Previous Topic:Memory leaks?
Next Topic:JNI: Compiled succesfull, hang on execute [3/3] "StrLen.java" (1/1)
Goto Forum:
  


Current Time: Tue Jul 22 00:53:35 EDT 2025

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

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

Back to the top