W
waltbrad
What can I do to get Dev-Cpp to compile C code? Whenever I try
compiling C code the compiler complains about the headers.
For instance the codeI do name the code with extension.c)
#include <stdio.h>
#include <string.h>
int main(int argc, char **argv)
{
char buffer[100];
strcpy(buffer, argv[1]);
printf("%s\n", buffer);
}
gives me the errors:
Compiler: Default compiler
Executing gcc.exe...
gcc.exe "C:\cCode\vulnerable.c" -o "C:\cCode\vulnerable.exe" -ansi -
pedantic -Wall -g3 -O0 -fexceptions -g3 -I"C:\DEV-CPP\include" -L"C:
\DEV-CPP\lib" -g3
In file included from C:/DEV-CPP/include/stdio.h:26,
from C:\cCode\vulnerable.c:1:
C:/DEV-CPP/include/stddef.h:6:2: warning: #include_next is a GCC
extension
In file included from C:/DEV-CPP/include/stdio.h:28,
from C:\cCode\vulnerable.c:1:
C:/DEV-CPP/include/stdarg.h:6:2: warning: #include_next is a GCC
extension
In file included from C:\cCode\vulnerable.c:1:
C:/DEV-CPP/include/stdio.h:330: warning: ISO C90 does not support
`long long'
In file included from C:/DEV-CPP/include/string.h:24,
from C:\cCode\vulnerable.c:2:
C:/DEV-CPP/include/stddef.h:6:2: warning: #include_next is a GCC
extension
C:\cCode\vulnerable.c: In function `main':
C:\cCode\vulnerable.c:12: warning: control reaches end of non-void
function
Execution terminated
Compilation successful
compiling C code the compiler complains about the headers.
For instance the codeI do name the code with extension.c)
#include <stdio.h>
#include <string.h>
int main(int argc, char **argv)
{
char buffer[100];
strcpy(buffer, argv[1]);
printf("%s\n", buffer);
}
gives me the errors:
Compiler: Default compiler
Executing gcc.exe...
gcc.exe "C:\cCode\vulnerable.c" -o "C:\cCode\vulnerable.exe" -ansi -
pedantic -Wall -g3 -O0 -fexceptions -g3 -I"C:\DEV-CPP\include" -L"C:
\DEV-CPP\lib" -g3
In file included from C:/DEV-CPP/include/stdio.h:26,
from C:\cCode\vulnerable.c:1:
C:/DEV-CPP/include/stddef.h:6:2: warning: #include_next is a GCC
extension
In file included from C:/DEV-CPP/include/stdio.h:28,
from C:\cCode\vulnerable.c:1:
C:/DEV-CPP/include/stdarg.h:6:2: warning: #include_next is a GCC
extension
In file included from C:\cCode\vulnerable.c:1:
C:/DEV-CPP/include/stdio.h:330: warning: ISO C90 does not support
`long long'
In file included from C:/DEV-CPP/include/string.h:24,
from C:\cCode\vulnerable.c:2:
C:/DEV-CPP/include/stddef.h:6:2: warning: #include_next is a GCC
extension
C:\cCode\vulnerable.c: In function `main':
C:\cCode\vulnerable.c:12: warning: control reaches end of non-void
function
Execution terminated
Compilation successful