+ 1

I can't open Code::Blocks project

Whenever I create a project, the main.cpp file is hidden and I can't find it. https://imgur.com/a/63WALgt

24th Jun 2020, 10:02 AM
Clueless Coder
Clueless Coder - avatar
6 Answers
+ 2
Oh, and "main.cpp" won't appear in the "Resources" tab, try the "Projects" tab
24th Jun 2020, 10:24 AM
Dennis
Dennis - avatar
+ 3
Dennis I found the file. (externally) But it won't let me open with Codeblocks. I click "open with" go through all the apps and clodeblocks isn't there
24th Jun 2020, 10:20 AM
Clueless Coder
Clueless Coder - avatar
+ 2
Glad you got it solved :)
24th Jun 2020, 10:26 AM
Dennis
Dennis - avatar
+ 1
main.cpp is not created, you have to create it yourself. After I create a new empty project the first thing I do is File -> New -> Empty File -> Press "Yes" at the "Add file to project" dialog -> name it "main.cpp" -> save -> Press "Ok" at the "Multiple selection" dialog -> start typing
24th Jun 2020, 10:18 AM
Dennis
Dennis - avatar
+ 1
Which project type did you select? Try adding the main.cpp file manually to the project by right clicking the project in the management tab on the left and selecting "Add files..."
24th Jun 2020, 10:23 AM
Dennis
Dennis - avatar
+ 1
Dennis Got it! For some reason it's stopped opening on projects. Thanks. The creating file manually also works too.
24th Jun 2020, 10:26 AM
Clueless Coder
Clueless Coder - avatar