News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

Can't compile new file in a project.

Started by Raigeki, September 25, 2014, 03:24:02 AM

Previous topic - Next topic

Raigeki

When in a project, I can only compile the main.cpp file. I added a new file to write a new program but the compiler it won't compile it.

Do I have to make a new project for every new program I write? If that is the case, what is the point of adding .cpp files to an existing project?

I'm sorta new, so help me out here  ;D

stahta01

Is it a true multi file project?

If yes, at most one of the source files will have a main function in it.

If they both have main functions; then each of the files must be in a separate CB target.

Tim S.


C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]