well yes perhaps I should have been more specific. Say I have a project named "test", which has the file main.c
the content is:
#include <stdio.h>
int main ()
{
printf("hello world ")
return 0;
}
Whenever I compile using djgpp in the command prompt I get:
c:\>GCC.EXE -Wall -g -IC:\DJGPP\BIN -c C:\dos\test\main.c -o obj\Debug\main.o
C:\dos\test\main.c: In function 'main':
C:\dos\test\main.c:6: error: expected ';' before '}' token
C:\dos\test\main.c:6: warning: control reaches end of non-void function
c:\>_
but when doing it in c::b I get this in the message box:
-------------- Build: Debug in test ---------------
GCC.EXE -Wall -g -IC:\DJGPP\BIN -c C:\dos\test\main.c -o obj\Debug\main.o
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings
Yes I know c::b, there is an error in my code! but where ??
As you can see, c::b doesn't show me explicitly where and what errors do I have, I was hoping that there is a window or something like in Visual Studio that would let me see exactly in what line is the semicolon missing (I have projects about thousand of lines of code and it will be no fun to look out where is the semicolon missing or where i forgot a parenthesis ;) )
If not I guess the solution will be keep using the command prompt... which is what I don't want :D
hope you guys can help, thanks!
I fail to reproduce your error also. The steps I perform was:
1. open codeblocks
2. file -> new -> file...
3. C/C++ Source File
4. save file as 'main.c' on my desktop
5. copy/paste code exactly as you stated
#include <stdio.h>
int main ()
{
printf("hello world ")
return 0;
}
6. click Build
Build Log tab displays:
Compiling: C:\Documents and Settings\Owner\Desktop\main.c
C:\Documents and Settings\Owner\Desktop\main.c: In function `int main()':
C:\Documents and Settings\Owner\Desktop\main.c:5: error: expected `;' before "return"
Process terminated with status 1 (0 minutes, 0 seconds)
1 errors, 0 warnings
Build Messages tab displays:
C:\Documents and Settings\Owner\Desktop\main.c In function `int main()':
C:\Documents and Settings\Owner\Desktop\main.c 5 error: expected `;' before "return"
=== Build finished: 1 errors, 0 warnings ===
EXACT same results if i go ahead and make a proper project first instead of compiling an orphan file.