Sender: perron AT art DOT alcatel DOT fr Message-Id: <3483DC95.3C28@art.alcatel.fr> Date: Tue, 02 Dec 1997 11:01:57 +0100 From: Olivier PERRON Mime-Version: 1.0 To: Christopher Croughton Cc: djgpp AT delorie DOT com Subject: Re: Help: RSXNTDJ and FLEX seem not to be compatible References: <97Dec1.193324gmt+0100 DOT 17027 AT internet01 DOT amc DOT de> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Precedence: bulk Christopher Croughton wrote: > [...] > Were there any other warnings when you compiled the files? It sounds to me > as if RSXNTDJ might have ferror and fileno defined as macros for Windows > compilation, and it's (for some reason) not finding them in the header files > as macros and so expecting them as externals. Could you post the lines > (and -v output) of the compilation as well as the link? > > Actually, fileno is not an ANSI function (ANSI only defines the stream > I/O functions, fread etc.) so it might not exist at all. Do the other > Unix-type I/O functions exist (open, close etc.)? > > It's quite common for flex output to get the lines confused. It seems to > issue #line directives occasionally when it feels like it, and this can > really confuse the compiler and linker (and especially gdb!). > > Chris C No, there were no significant other warning. I used flex/bison without any problems *BEFORE* I installed RSXNTDJ. I also have a simplified version of my program which runs only under DOS. I can't even link this simplified version with RSXNTDJ installed. If I revert my djgpp.env file to original (i.e. discarding RSXNTDJ specific add-on), my simplified program link without probblems (and run also without problem). So, here are the RSXNTDJ related definitions in my djgpp.env file: [cpp] CPLUS_INCLUDE_PATH=%/>;CPLUS_INCLUDE_PATH%%DJDIR%/lang/cxx;%DJDIR%/include;%DJDIR%/contrib/grx20/include;%RSXNTDJ%/include/mssdk;%RSXNTDJ%/include/win32 C_INCLUDE_PATH=%/>;C_INCLUDE_PATH%%DJDIR%/include;%DJDIR%/contrib/grx20/include;%RSXNTDJ%/include/mssdk;%RSXNTDJ%/include/win32 OBJCPLUS_INCLUDE_PATH=%/>;OBJCPLUS_INCLUDE_PATH%%DJDIR%/include;%DJDIR%/lang/objc;%RSXNTDJ%/include/mssdk;%RSXNTDJ%/include/win32 OBJC_INCLUDE_PATH=%/>;OBJC_INCLUDE_PATH%%DJDIR%/include;%DJDIR%/lang/objc;%RSXNTDJ%/include/mssdk;%RSXNTDJ%/include/win32 [gcc] COMPILER_PATH=%/>;COMPILER_PATH%%DJDIR%/bin LIBRARY_PATH=%/>;LIBRARY_PATH%;%RSXNTDJ%/lib;%DJDIR%/lib;%DJDIR%/contrib/grx20/lib And here are the lines and -v output of the compilation as well as the link: (By the way, the link is done here with the binutils2.7 ld.exe, not the RSXNTDJ one in order to see the unresolved references) gcc -Zwin32 -v -c -Wall -g -I./dsplib parserad.c -o parserad.o Reading specs from C:\DJGPP\RSXNTDJ/lib\specs gcc version 2.7.2.1 c:/djgpp/bin\cpp.exe -lang-c -v -I./dsplib -undef -D__GNUC__=2 -D__GNUC_MINOR__=7 -Dunix -Di386 -DGO32 -DMSDOS -DDJGPP=2 -DDJGPP_MINOR=1 -D__unix__ -D__i386__ -D__GO32__ -D__MSDOS__ -D__DJGPP__=2 -D__DJGPP_MINOR__=1 -D__unix -D__i386 -D__GO32 -D__MSDOS -D__DJGPP=2 -D__DJGPP_MINOR=1 -g -Wall -D__WIN32__ -D__RSXNT__ -D__EMX__ -Ic:/djgpp/rsxntdj/include parserad.c D:\TMP\ccbaaaaa GNU CPP version 2.7.2.1 (80386, BSD syntax) #include "..." search starts here: #include <...> search starts here: ./dsplib c:/djgpp/rsxntdj/include c:/djgpp/include c:/djgpp/contrib/grx20/include C:\DJGPP\RSXNTDJ/include/mssdk C:\DJGPP\RSXNTDJ/include/win32 /usr/local/include /usr/local/go32/include /usr/local/lib/gcc-lib/go32/2.7.2.1/include /usr/include End of search list. c:/djgpp/bin\cc1.exe D:\TMP\ccbaaaaa -quiet -dumpbase parserad.c -g -Wall -version -o D:\TMP\cccaaaaa GNU C version 2.7.2.1 (80386, BSD syntax) compiled by GNU C version 2.7.2.1. c:/djgpp/bin\as.exe -o parserad.o D:\TMP\cccaaaaa gcc -Zwin32 -v -c -Wall -g -I./dsplib flexrad.c -o flexrad.o Reading specs from C:\DJGPP\RSXNTDJ/lib\specs gcc version 2.7.2.1 c:/djgpp/bin\cpp.exe -lang-c -v -I./dsplib -undef -D__GNUC__=2 -D__GNUC_MINOR__=7 -Dunix -Di386 -DGO32 -DMSDOS -DDJGPP=2 -DDJGPP_MINOR=1 -D__unix__ -D__i386__ -D__GO32__ -D__MSDOS__ -D__DJGPP__=2 -D__DJGPP_MINOR__=1 -D__unix -D__i386 -D__GO32 -D__MSDOS -D__DJGPP=2 -D__DJGPP_MINOR=1 -g -Wall -D__WIN32__ -D__RSXNT__ -D__EMX__ -Ic:/djgpp/rsxntdj/include flexrad.c D:\TMP\ccbaaaaa GNU CPP version 2.7.2.1 (80386, BSD syntax) #include "..." search starts here: #include <...> search starts here: ./dsplib c:/djgpp/rsxntdj/include c:/djgpp/include c:/djgpp/contrib/grx20/include C:\DJGPP\RSXNTDJ/include/mssdk C:\DJGPP\RSXNTDJ/include/win32 /usr/local/include /usr/local/go32/include /usr/local/lib/gcc-lib/go32/2.7.2.1/include /usr/include End of search list. c:/djgpp/bin\cc1.exe D:\TMP\ccbaaaaa -quiet -dumpbase flexrad.c -g -Wall -version -o D:\TMP\cccaaaaa GNU C version 2.7.2.1 (80386, BSD syntax) compiled by GNU C version 2.7.2.1. flexrad.l:394: warning: `yyunput' defined but not used c:/djgpp/bin\as.exe -o flexrad.o D:\TMP\cccaaaaa gcc -Zwin32 -v -c -Wall -g -I./dsplib artist.c -o artist.o Reading specs from C:\DJGPP\RSXNTDJ/lib\specs gcc version 2.7.2.1 c:/djgpp/bin\cpp.exe -lang-c -v -I./dsplib -undef -D__GNUC__=2 -D__GNUC_MINOR__=7 -Dunix -Di386 -DGO32 -DMSDOS -DDJGPP=2 -DDJGPP_MINOR=1 -D__unix__ -D__i386__ -D__GO32__ -D__MSDOS__ -D__DJGPP__=2 -D__DJGPP_MINOR__=1 -D__unix -D__i386 -D__GO32 -D__MSDOS -D__DJGPP=2 -D__DJGPP_MINOR=1 -g -Wall -D__WIN32__ -D__RSXNT__ -D__EMX__ -Ic:/djgpp/rsxntdj/include artist.c D:\TMP\ccbaaaaa GNU CPP version 2.7.2.1 (80386, BSD syntax) #include "..." search starts here: #include <...> search starts here: ./dsplib c:/djgpp/rsxntdj/include c:/djgpp/include c:/djgpp/contrib/grx20/include C:\DJGPP\RSXNTDJ/include/mssdk C:\DJGPP\RSXNTDJ/include/win32 /usr/local/include /usr/local/go32/include /usr/local/lib/gcc-lib/go32/2.7.2.1/include /usr/include End of search list. c:/djgpp/bin\cc1.exe D:\TMP\ccbaaaaa -quiet -dumpbase artist.c -g -Wall -version -o D:\TMP\cccaaaaa GNU C version 2.7.2.1 (80386, BSD syntax) compiled by GNU C version 2.7.2.1. artist.c:47: warning: `rcsid' defined but not used c:/djgpp/bin\as.exe -o artist.o D:\TMP\cccaaaaa gcc -Zwin32 -v -c -Wall -g -I./dsplib windecod.c -o windecod.o Reading specs from C:\DJGPP\RSXNTDJ/lib\specs gcc version 2.7.2.1 c:/djgpp/bin\cpp.exe -lang-c -v -I./dsplib -undef -D__GNUC__=2 -D__GNUC_MINOR__=7 -Dunix -Di386 -DGO32 -DMSDOS -DDJGPP=2 -DDJGPP_MINOR=1 -D__unix__ -D__i386__ -D__GO32__ -D__MSDOS__ -D__DJGPP__=2 -D__DJGPP_MINOR__=1 -D__unix -D__i386 -D__GO32 -D__MSDOS -D__DJGPP=2 -D__DJGPP_MINOR=1 -g -Wall -D__WIN32__ -D__RSXNT__ -D__EMX__ -Ic:/djgpp/rsxntdj/include windecod.c D:\TMP\ccbaaaaa GNU CPP version 2.7.2.1 (80386, BSD syntax) #include "..." search starts here: #include <...> search starts here: ./dsplib c:/djgpp/rsxntdj/include c:/djgpp/include c:/djgpp/contrib/grx20/include C:\DJGPP\RSXNTDJ/include/mssdk C:\DJGPP\RSXNTDJ/include/win32 /usr/local/include /usr/local/go32/include /usr/local/lib/gcc-lib/go32/2.7.2.1/include /usr/include End of search list. c:/djgpp/bin\cc1.exe D:\TMP\ccbaaaaa -quiet -dumpbase windecod.c -g -Wall -version -o D:\TMP\cccaaaaa GNU C version 2.7.2.1 (80386, BSD syntax) compiled by GNU C version 2.7.2.1. windecod.c: In function `open_new_file': windecod.c:369: warning: implicit declaration of function `yyparse' c:/djgpp/bin\as.exe -o windecod.o D:\TMP\cccaaaaa gcc -v -Zwin32 parserad.o flexrad.o artist.o windecod.o -o windecod.exe -lfl -lcomdl Reading specs from C:\DJGPP\RSXNTDJ/lib\specs gcc version 2.7.2.1 c:/djgpp/bin\ld.exe -Lc:/djgpp/rsxntdj/lib/all -o windecod.exe C:\DJGPP\RSXNTDJ /lib\crt0w32.o -L. -LC:\DJGPP\RSXNTDJ/lib\st -LC:\DJGPP\RSXNTDJ/lib -Lc:/djgpp/l ib -L/usr/lib parserad.o flexrad.o artist.o windecod.o -lfl -lcomdl -Trsxnt.djl -lmain -lalias -lgcc -lc -lc_app -lc -lgcc -lemx -lemx2 -lkrn32 -lusr32 -lgdi32 fflexrad.o: In function `yy_get_next_buffer': flexrad.c:286: undefined reference to `_getc_inline' flexrad.c(.text+0xdda): undefined reference to `ferror' flexrad.c:287: undefined reference to `ferror' flexrad.o: In function `yy_init_buffer': flexrad.c:640: undefined reference to `fileno' make.exe: *** [windecod.exe] Error 1