News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Multiple files with main() in a project?

Started by malaywang, November 25, 2005, 07:37:57 AM

Previous topic - Next topic

malaywang

My problem is:
I have many files in a project, and some of them have main() defined  inside.
When I build the project, the compiler complains about multiple main() definitions...

Can I choose the main() to run in a project??
For example, I can choose the class with main() to run in a project under Jbuilder enviroment.

Thx for your great help.

rickg22

That's what targets are for. A file can belong to multiple targets. A target can be an exe, a dll, a lib, etc.

malaywang

Thanks a lot   :D
Now I figure out how it works.
(Migrating my files to C::B now  :) thx)