Re: [Dev-C++] Problems with compiling
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Jan M. <jan...@vo...> - 2007-05-20 18:37:59
|
Well, it really works now. Anyway I do not understand it at all, it had problem only with this NULL and no function from standard headers I use there. But thank you very much. Jan Mura . ----- Original Message ----- From: "Per Westermark" <pw...@ia...> To: "Jan Mura" <jan...@vo...> Cc: <dev...@li...> Sent: Sunday, May 20, 2007 7:42 PM Subject: Re: [Dev-C++] Problems with compiling > 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 > > > > > > __________ Informace od NOD32 2278 (20070520) __________ > > Tato zprava byla proverena antivirovym systemem NOD32. > http://www.nod32.cz > > |