Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: Raigeki on September 25, 2014, 03:24:02 am

Title: Can't compile new file in a project.
Post by: Raigeki on September 25, 2014, 03:24:02 am
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
Title: Re: Can't compile new file in a project.
Post by: stahta01 on September 25, 2014, 05:07:14 am
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.