Xref: news2.mv.net comp.os.msdos.djgpp:8186 From: potatopigeon AT easynet DOT co DOT uk (Potato Pigeon) Newsgroups: comp.os.msdos.djgpp Subject: UNDEFINED ERRORS Date: Fri, 30 Aug 1996 23:25:33 GMT Organization: [posted via] Easynet Group PLC Lines: 125 Message-ID: <50717d$588@cherry.easynet.co.uk> NNTP-Posting-Host: potatopigeon.easynet.co.uk To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp I posted a recent message asking for help on compiling the program demo.c that comes with the graphics library ALLEGRO. Thanks for Eli`s help on that question but i still cant compile any example programs or the demo.c program. I keep on getting Undefined error messages and its beginning to bug me!! Ive checked all the text and FAQ files for answers but with no luck. When trying to compile the example programs ex1.c, ex2.c etc. I get the following: Reading specs from c:/cprog/lib\specs gcc version 2.7.2 c:/cprog/bin\cpp.exe -lang-c -v -undef -D__GNUC__=2 -D__GNUC_MINOR__=7 -Dunix -Di386 -DGO32 -DMSDOS -DDJGPP=2 -DDJGPP_MINOR=0 -D__unix__ -D__i386__ -D__GO32__ -D__MSDOS__ -D__DJGPP__=2 -D__DJGPP_MINOR__=0 -D__unix -D__i386 -D__GO32 -D__MSDOS -D__DJGPP=2 -D__DJGPP_MINOR=0 -Wall ex1.c c:/cprog/tmp\ccbaaaaa GNU CPP version 2.7.2 (80386, BSD syntax) #include "..." search starts here: #include <...> search starts here: c:/cprog/include c:/cprog/contrib/grx20/include /usr/local/include /usr/local/go32/include /usr/local/lib/gcc-lib/go32/2.7.2/include /usr/include End of search list. c:/cprog/bin\cc1.exe c:/cprog/tmp\ccbaaaaa -fno-strength-reduce -quiet -dumpbase ex1.c -Wall -version -o c:/cprog/tmp\cccaaaaa GNU C version 2.7.2 (80386, BSD syntax) compiled by GNU C version 2.7.2. c:/cprog/bin\as.exe -o c:/cprog/tmp\ccdaaaaa c:/cprog/tmp\cccaaaaa c:/cprog/bin\ld.exe c:/cprog/lib\crt0.o -Lc:/cprog/lib -Lc:/cprog/contrib/grx20/lib c:/cprog/tmp\ccdaaaaa -lalleg -Tdjgpp.lnk -lgcc -lc -lgcc -lalleg graphics.c(.data+0x1c): undefined reference to `gfx_modex' graphics.c(.data+0x40): undefined reference to `gfx_xtended' ------------------------------------------------------------------------------------ On running the make util for allegro i get: Reading specs from c:/cprog/lib\specs gcc version 2.7.2 c:/cprog/bin\cpp.exe -lang-c -v -undef -D__GNUC__=2 -D__GNUC_MINOR__=7 -Dunix -Di386 -DGO32 -DMSDOS -DDJGPP=2 -DDJGPP_MINOR=0 -D__unix__ -D__i386__ -D__GO32__ -D__MSDOS__ -D__DJGPP__=2 -D__DJGPP_MINOR__=0 -D__unix -D__i386 -D__GO32 -D__MSDOS -D__DJGPP=2 -D__DJGPP_MINOR=0 -Wall demo.c c:/cprog/tmp\ccbaaaaa GNU CPP version 2.7.2 (80386, BSD syntax) #include "..." search starts here: #include <...> search starts here: c:/cprog/include c:/cprog/contrib/grx20/include /usr/local/include /usr/local/go32/include /usr/local/lib/gcc-lib/go32/2.7.2/include /usr/include End of search list. c:/cprog/bin\cc1.exe c:/cprog/tmp\ccbaaaaa -fno-strength-reduce -quiet -dumpbase demo.c -Wall -version -o c:/cprog/tmp\cccaaaaa GNU C version 2.7.2 (80386, BSD syntax) compiled by GNU C version 2.7.2. c:/cprog/bin\as.exe -o c:/cprog/tmp\ccdaaaaa c:/cprog/tmp\cccaaaaa c:/cprog/bin\ld.exe -o demo.exe c:/cprog/lib\crt0.o -Lc:/cprog/lib -Lc:/cprog/contrib/grx20/lib c:/cprog/tmp\ccdaaaaa -lalleg -Tdjgpp.lnk -lgcc -lc -lgcc -lalleg demo.c(.text+0x29a2): undefined reference to `poll_modex_scroll' demo.c(.text+0x29d6): undefined reference to `request_modex_scroll' demo.c(.text+0x549e): undefined reference to `gfx_modex' sound.c(.text+0x73b): undefined reference to `_dma_lock_mem' graphics.c(.data+0x1c): undefined reference to `gfx_modex' graphics.c(.data+0x40): undefined reference to `gfx_xtended' sb.c(.text+0x804): undefined reference to `_dma_start' sb.c(.text+0x836): undefined reference to `_dma_todo' sb.c(.text+0x1017): undefined reference to `_dma_allocate_mem' sb.c(.text+0x1037): undefined reference to `_dma_allocate_mem' sb.c(.text+0x1066): undefined reference to `_dma_allocate_mem' sb.c(.text+0x11eb): undefined reference to `_dma_start' sb.c(.text+0x1236): undefined reference to `_dma_stop' -------------------------------------------------------------------------------------------------------- And finally, I get the following when i try to compile the demo.c program: gcc -s -v -Wall -o demo/demo.exe obj/demo.o liballeg.a Reading specs from c:/cprog/lib\specs gcc version 2.7.2 c:/cprog/bin\ld.exe -o demo/demo.exe -s c:/cprog/lib\crt0.o -Lc:/cprog/lib -Lc:/cprog/contrib/grx20/lib obj/demo.o liballeg.a -Tdjgpp.lnk -lgcc -lc -lgcc -lalleg demo.c(.text+0x12c9): undefined reference to `poll_modex_scroll' demo.c(.text+0x12f6): undefined reference to `request_modex_scroll' demo.c(.text+0x3846): undefined reference to `gfx_modex' sound.c(.text+0x73b): undefined reference to `_dma_lock_mem' graphics.c(.data+0x1c): undefined reference to `gfx_modex' graphics.c(.data+0x40): undefined reference to `gfx_xtended' sb.c(.text+0x804): undefined reference to `_dma_start' sb.c(.text+0x836): undefined reference to `_dma_todo' sb.c(.text+0x1017): undefined reference to `_dma_allocate_mem' sb.c(.text+0x1037): undefined reference to `_dma_allocate_mem' sb.c(.text+0x1066): undefined reference to `_dma_allocate_mem' sb.c(.text+0x11eb): undefined reference to `_dma_start' sb.c(.text+0x1236): undefined reference to `_dma_stop' make.exe: *** [demo/demo.exe] Error 1 -------------------------------------------------------------------------------------- Ive already tried linking in the graphics libraries with "-lalleg" and "-lgrx20" but the same errors appear. gfx_modex, for example, is defined in the allegro.h file and is included in the demo.c program, so I cant understand why gcc or the linker doesnt know what gfx_modex is! Please help by sending solutions to the following e-mail address: potatopigeon AT easynet DOT co DOT uk Thanks, and im sorry for the size of this posting if like me, you pay for every minute you spend on the internet. --Paul Costello