Re: [Dev-C++] Problems with compiling
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Per W. <pw...@ia...> - 2007-05-20 17:43:43
|
It isn't enough to include andy standard header files in one of your c files. All c files that contains references to functions from the standard library, or functions from other c files must include the relevant header files. /pwm On Sun, 20 May 2007, Jan Mura wrote: > Hello, > > I would like to ask something about compiling of files under gcc.exe > (Dev-Cpp on Win XP). > Iam trying to compile two files which should produce one executable file. > One of the file is main.c in which I include all > standard headers and header file for main and the other source file. > > And under console I am trying to do something like: > > gcc.exe main.c bet_list.c -o ruleta.exe > > And the output is like: > bet_list.c: In function `print_list': > bet_list.c:9: error: `NULL' undeclared (first use in this function) > bet_list.c:9: error: (Each undeclared identifier is reported only once > bet_list.c:9: error: for each function it appears in.) > bet_list.c: In function `empty_list': > bet_list.c:30: error: `NULL' undeclared (first use in this function) > bet_list.c: In function `in_list': > bet_list.c:77: error: `NULL' undeclared (first use in this > ... > and so on for every NULL in bet_list.c > > If I compile just bet_list.c and I include the main() function in this file > together with including the standard headers, the compilation is without > errors. > I think the NULL is declared in stdlib.h which I include of course. > > Thank you for your hints. > > Jan Mura > jan...@vo... > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |