Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: deadneurons on May 12, 2008, 05:12:55 am

Title: djgpp doesn't show warnings/errors
Post by: deadneurons on May 12, 2008, 05:12:55 am
I am tinkering with djgpp, I managed to compile a hello world,
but when a compile did not work, I don't see the warnings/errors
even if I have -Wall option. Build log just says "Process terminates with status 1".
'am using svn5048.
Title: Re: djgpp doesn't show warnings/errors
Post by: polygon7 on May 12, 2008, 07:48:04 am
Hi,
see: https://developer.berlios.de/bugs/?func=detailbug&group_id=5358&bug_id=11586

Workaround - make a batch files:

GCC.CMD:
Code
@copy %* > c:\djgpp\bin\gcc_params.txt
@c:\djgpp\bin\gcc.exe @c:\djgpp\bin\gcc_params.txt 2>&1
@del /Q c:\djgpp\bin\gcc_params.txt

GPP.CMD:
Code
@copy %* > c:\djgpp\bin\gpp_params.txt
@c:\djgpp\bin\gpp.exe @c:\djgpp\bin\gpp_params.txt 2>&1
@del /Q c:\djgpp\bin\gpp_params.txt

put them into c:\djgpp\bin and change toolchain executables to them.

Title: Re: djgpp doesn't show warnings/errors
Post by: deadneurons on May 12, 2008, 03:40:17 pm
Thanks, I search for it but didn't get a hit but now it seems good.
the one liner batch command you posted at https://developer.berlios.de/bugs/?func=detailbug&group_id=5358&bug_id=11586 works out ok.

here's what i'm testing without headers.
Code
int main()
{
    printf("Hello world!\n")
    return 0;
}

Code
gcc.cmd -Wall  -O2     -c C:\CodeBlocks\Projects\djgpp\main.c -o obj\Release\main.o
C:\CodeBlocks\Projects\djgpp>gcc.exe -Wall  -O2     -c C:\CodeBlocks\Projects\djgpp\main.c -o obj\Release\main.o  2>&1
C:\CodeBlocks\Projects\djgpp\main.c: In function 'main':
C:\CodeBlocks\Projects\djgpp\main.c:4: warning: implicit declaration of function 'printf'
C:\CodeBlocks\Projects\djgpp\main.c:4: warning: incompatible implicit declaration of built-in function 'printf'
C:\CodeBlocks\Projects\djgpp\main.c:5: error: expected ';' before 'return'
Process terminated with status 1 (0 minutes, 0 seconds)
1 errors, 2 warnings

but the one you got from the post above spits out this:
Code
gcc.cmd -Wall  -O2     -c C:\CodeBlocks\Projects\djgpp\main.c -o obj\Release\main.o
gcc.exe: The: No such file or directory (ENOENT)
gcc.exe: system: No such file or directory (ENOENT)
gcc.exe: cannot: No such file or directory (ENOENT)
gcc.exe: find: No such file or directory (ENOENT)
gcc.exe: the: No such file or directory (ENOENT)
gcc.exe: file: No such file or directory (ENOENT)
gcc.exe: specified.: No such file or directory (ENOENT)
gcc.exe: no input files
gpp.cmd  -o bin\Release\djgpp.exe obj\Release\main.o   -s 
gpp.exe: The: No such file or directory (ENOENT)
gpp.exe: system: No such file or directory (ENOENT)
gpp.exe: cannot: No such file or directory (ENOENT)
gpp.exe: find: No such file or directory (ENOENT)
gpp.exe: the: No such file or directory (ENOENT)
gpp.exe: file: No such file or directory (ENOENT)
gpp.exe: specified.: No such file or directory (ENOENT)
gpp.exe: no input files
Process terminated with status 0 (0 minutes, 0 seconds)
0 errors, 0 warnings

edit:
I think I figure out what's that batch cmds do, i'll try it again.
edit2:
hmmn, didn't work, I thought wrong. I'll stick to the one the works.
thanks again.
Title: Re: djgpp doesn't show warnings/errors
Post by: polygon7 on May 12, 2008, 09:42:29 pm
Ahh, sorry, change "copy" in first line of batches to "echo".
Title: Re: djgpp doesn't show warnings/errors
Post by: deadneurons on May 13, 2008, 02:10:19 am
thank you, it works out great.