User forums > Help
Unable to Run a project
ChrisC:
Hi,
I just started learning C++ and I installed Code::Blocks 1.0-RC2.
I have Windows XP Pro and Code::Blocks is installed in:
C:\Program Files\CodeBlocks
I just created a new console project (a simple "Hello World!") and I saved all the files in:
C:My Documents\CodeBlocks\Projects\Test
Compile goes without a problem.
When I click run, from within Code::Blocks, I get a command prompt screen with the following message:
'C:\Documents' is not recognized as an internal or external command,
operable program or batch file.
The system cannot find the path specified.
When I double click directly on the test.exe file, a screen appears and then disappears a split second later.
When I try to run the test.exe file from run>cmd command prompt, I get the following message:
'C:\Documents' is not recognized as an internal or external command,
operable program or batch file.
The system cannot find the path specified.
I've searched the forums and the internet but I'm unable to find a working solution. Please help.
Chris
Michael:
--- Quote from: ChrisC on April 25, 2006, 06:52:31 pm ---I just started learning C++ and I installed Code::Blocks 1.0-RC2.
--- End quote ---
Do not use RC2 (is a bit old now). Use the latest nightly build instead. Get it here:
http://forums.codeblocks.org/index.php?board=20.0
--- Quote from: ChrisC on April 25, 2006, 06:52:31 pm ---When I double click directly on the test.exe file, a screen appears and then disappears a split second later.
--- End quote ---
This is normal. You double click on the consol application (test.exe), the program run or crashes and then the command window is immediately closed.
Anyway, try not to use pathes with white spaces, e.g., C:\My Documents, but rather C:\MyDocuments.
Best wishes,
Michae
ChrisC:
First of all, thank you Michael for helping me resolve my problem. :P
For the benefit of those who may have a similar problem, this is what I did to resolve it:
I created a new directory for my project files:
C:\CodeBlocks
No white spaces in the path as per Michael's advice.
I downloaded the latest Nightly build and extracted it to:
C:\Program Files\CodeBlocks\CBNB
I then added mingwm10.dll and wxmsw26u_gcc_cb.dll to the above directory.
Afterwards, I launched the Code::Blocks application from within:
C:\Program Files\CodeBlocks\CBNB
Everything loaded fine.
Finally I created a new "Hello World" console project, compiled it, and runed it.
Everything went well and my code executed as it was supposed to.
Now, as this is the first time I use the Nightly builds, should I copy the lib folder and other folders or files from the initial Code::Blocks folder:
C:\Program Files\CodeBlocks\
to the Nightly build folder?:
C:\Program Files\CodeBlocks\CBNB
Thanks again for your help!
Chris
MortenMacFly:
--- Quote from: ChrisC on April 25, 2006, 08:20:45 pm ---Now, as this is the first time I use the Nightly builds, should I copy the lib folder and other folders or files from the initial Code::Blocks folder:
--- End quote ---
Well, once you've managed to install a nightly you might also be interested to intall MinGW from Mingw.org seperately. This is the same compiler as it ships with C::B-RC2. If you don't want to do this it is safe to copy the following folders to your nightly folder:
- bin
- doc
- include
- info
- lib
- libexec
- man
- mingw32
And nothing else. Again: You may want tot seperate the IDE from the compiler(s). Thus you could also copy these folders into another folder and setup the compiler path's for the binaries, includes and libs in your nightly accordingly.
With regards, Morten.
ChrisC:
Thanks Morten for the advice. The idea of separating the IDE from the compiler sounds interesting. But to do so, are the following steps the way to do it?
Download and install MinGW-5.0.2
Replace the contents of initial Code::Blocks folder:
C:\Program Files\CodeBlocks\
with the contents of the Nightly build folder:
C:\Program Files\CodeBlocks\CBNB
Setup the compiler path's after launching Code::Blocks.
Something tells me I'm missing someting...
Chris
Navigation
[0] Message Index
[#] Next page
Go to full version