Author Topic: SOLUTION for "no target in no project" - C++ - Leave your solutions!  (Read 31765 times)

Offline hundred4ever

  • Single posting newcomer
  • *
  • Posts: 3
Hey.

Using codeblocks 16.01 mingw setup, I came across this error:

||=== Build file: "no target" in "no project" (compiler: unknown) ===|

I researched a bit online, as I'm a new user, and found that single .cpp files can't be built in Code::Blocks. You have to create a project, and then add a source file.


INSTRUCTIONS:

After opening Code::Blocks > File > New > Project > Go through the wizard > FINISH > This creates a project file with a .cpb extension.

To your left, under project, you'll see your project file name with a Code::Blocks icon. This links to your .cpb file.


To add a source file:

Highlight your new project file name (to the left, with the icon) > File > New > Empty file > Create file name (ex. HelloWorld.cpp) > SAVE

This new file will open in your editor, and be available under Sources.


Good luck, all!

Hope this helps.

Leave a solution or comment.
« Last Edit: October 11, 2017, 01:41:15 am by hundred4ever »