Code::Blocks Forums

User forums => Help => Topic started by: Zeus on August 08, 2005, 03:44:35 am

Title: Won't compile! Help!!!
Post by: Zeus on August 08, 2005, 03:44:35 am
Omg when I go to compile....it only works when I have a project open. If I go to compile a program under "Opened Files" all the compile options are greyed out except; "Compile Current File" "Errors --> Clear All Errors" and "Compile Options". When I click "Compile current file" , it gives me an error saying

Quote
cl.exe /nologo   /c "C:\Program Files\CodeBlocks\prog.cpp" /Fo"C:\Program Files\CodeBlocks\prog.obj"
Command execution failed...

But when I have a project open, I can compile it just fine (except when there's bugs...and if anyone can tell me where the debugger is for Microsoft Visual C++ Toolkit 2003 is that would be much appreciated). It's very weird. So again

Here's the problem in a nutshell for anyone who didn't feel like reading what I posted above..

The program won't compile unless I have it inside of an opened project.

Please help, and thank you all
Title: Re: Won't compile! Help!!!
Post by: grv575 on August 08, 2005, 03:58:39 am
command execution failed usually means it can't find the executable.  make sure cl.exe is in the PATH or the directories CB searches (check compile->compiler options->programs->additional paths).
Title: Re: Won't compile! Help!!!
Post by: Zeus on August 08, 2005, 04:18:30 am
thanks for the response

yes cl.exe is the path for the C and C++ compiler option boxes...

here's a pic

(http://img129.imageshack.us/img129/2537/sdgfgd7gz.jpg) (http://imageshack.us)
Title: Re: Won't compile! Help!!!
Post by: grv575 on August 08, 2005, 04:34:09 am
OK, you're right I get the same behavior.  The compiler paths aren't used if the source file doesn't belong to a project.  I'd submit a bug if one hasn't been submitted already.
Title: Re: Won't compile! Help!!!
Post by: rickg22 on August 08, 2005, 06:47:48 am
OK, you're right I get the same behavior.  The compiler paths aren't used if the source file doesn't belong to a project.  I'd submit a bug if one hasn't been submitted already.


Please do, the "compile single file" option was implemented in the last minute, so it needs a lot of work.
Title: Re: Won't compile! Help!!!
Post by: tiwag on August 08, 2005, 08:30:24 am
we should remove this "Compile current file" possibility anyway
Title: Re: Won't compile! Help!!!
Post by: rickg22 on August 08, 2005, 08:03:41 pm
Oh no... it's the most asked-for feature! We should fix it instead.
Title: Re: Won't compile! Help!!!
Post by: Zeus on August 08, 2005, 08:04:04 pm
k i reported the bug with a priority of 8/9
Title: Re: Won't compile! Help!!!
Post by: grv575 on August 08, 2005, 10:18:49 pm
Oh, sorry should have post that I already reported it yesterday.  Btw, it only happens when using VC++ Toolkit 2003 as the compiler.  It works correctly when GCC is being used (haven't tested other compilers).