User forums > Help

Multiple files with main() in a project?

(1/1)

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)

Navigation

[0] Message Index

Go to full version