Code::Blocks Forums

User forums => Help => Topic started by: DS on September 25, 2012, 03:02:57 pm

Title: *** HELP NEEDED*** installing Code::Blocks with MinGW
Post by: DS on September 25, 2012, 03:02:57 pm
Hello All,

I followed the instruction that you laid out for installing Code::Blocks with MinGW. The installation was successful however I could not open the main.cpp file as I get the error message "Could not open the file main.cpp
The file does not exist"

I checked and found out that there were 23 main.cpp files in the Code Blocks folder . The path is - C:\Program Files\ CodeBlocks\share\CodeBlocks\templates\wizards.

Will you please let me know how I can address this issue.

Thanks,
DS
Title: Re: *** HELP NEEDED*** installing Code::Blocks with MinGW
Post by: zabzonk on September 25, 2012, 03:57:35 pm
Are you creating a project? You must do so. To create one:

 - start C::B
 - select "create new project"
 - choose "console application", and click "go"
 - choose "C++" and click "Next"
 - enter the project title, use something like "foobar"  with no spaces or special characters and click "Next"
 - click "Finish"

This will create a project that will show up in the project manager window with a suitable main.cpp - edit this main.cpp to meet your requirements
Title: Re: *** HELP NEEDED*** installing Code::Blocks with MinGW
Post by: DS on September 26, 2012, 10:46:33 am
Thanks Neil . I tried it but now I get the error message:

Couldn't save project <invalid path>
(Maybe the file is write -protected)


I tried out the same process that you have outlined with other file names , but I get the same error message.
Title: Re: *** HELP NEEDED*** installing Code::Blocks with MinGW
Post by: Freem on September 26, 2012, 10:52:04 am
If I am not wrong, when you just installed C::B, the field "Folder to create project in:" is empty.
You must say where your project will be created.
Title: Re: *** HELP NEEDED*** installing Code::Blocks with MinGW
Post by: DS on September 26, 2012, 10:56:13 am
Many thanks Freem
Title: Re: *** HELP NEEDED*** installing Code::Blocks with MinGW
Post by: jarod42 on September 26, 2012, 11:13:04 am
And avoid to create project under any directory in "Programs File" (where write permission is special).
Title: Re: *** HELP NEEDED*** installing Code::Blocks with MinGW
Post by: Freem on September 26, 2012, 11:21:16 am
Another advice would be to avoid creating it in a folder with a space or special character in the name, while we are at it.
Title: Re: *** HELP NEEDED*** installing Code::Blocks with MinGW
Post by: DS on September 26, 2012, 02:47:03 pm
Freem & jarod42 - Thanks a bunch