User forums > Help
gcc compiler can't make obj file for c file
outsky:
Hi,
I am fresh with code blocks.And I met some obvious problems,
here shows the message.How to make it right?
/*the source file*/
#include <stdio.h>
int main (void)
{
int a=10;
int b=20;
printf("%hd + %hd = %hd",a,b,a+b);
return 0;
}
And the problem is,
Compiling: Untitled1.c
Execution of 'mingw32-gcc.exe -Wall -g -I"C:\Program Files\CodeBlocks\MinGW\bin" -c C:\mingw\CodeBlocks\MinGW\bin\test\Untitled1.c -o obj\Debug\Untitled1.o' in 'C:\mingw\CodeBlocks\MinGW\bin\test' failed.
Nothing to be done.
could you please tell me why it failed ? I would appreciate it very much if anser me .
ironhead:
What happens if you execute the mingw32-gcc command from a command prompt?
yis:
ironhead,
I'm having a similar problem as outsky, but being a newbie maybe you could be more explicit as to how to solve this problem.
rcoll:
First question: are you using Vista? If so, take everything out of "C:\Program Files\*" and put it into a directory that has no spaces in the name.
Second: is your project really in the "\bin" directory? Take it out of there; make a directory such as "C:\MyWork" and put the source files in there. The "\bin" directory is for compiler files.
Third: that option -I"C:\Program Files\CodeBlocks\MinGW\bin" should probably be -I"C:\Program Files\CodeBlocks\MinGW\bin\test" (or C:\MyWork when you move the source files over).
Basically the message "Nothing to be done." means the compiler could not find your files to compile.
Ringo
yis:
Thanks for responding,
perhaps I wasn't specific enough. I am using windows XP. Here is exactly what I get when I run 'build' to compile.
Compiling: C:\Documents and Settings\ys\Start Menu\Programs\CodeBlocks\whatever.c
Execution of 'mingw32-g++.exe -c "C:\Documents and Settings\יys\Start Menu\Programs\CodeBlocks\whatever.c" -o "C:\Documents and Settings\ys\Start Menu\Programs\CodeBlocks\whatever.o"' in 'C:\Documents and Settings\ys\Start Menu\Programs\CodeBlocks' failed.
Nothing to be done.
What am I doing wrong?
Navigation
[0] Message Index
[#] Next page
Go to full version