X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Recipient: djgpp AT delorie DOT com X-YMail-OSG: sAH6LRAVM1nWFD0_rsmt1Y56w3Oahpqx6xIqGgZt2KkADoMPnN9O.FsNPZrIc4IVrULsgF.eJHSowwLdiU4OVWXvRgq3wtzmmOzC.DSe_ST5u1wAUVYxa5xjP1nfxpfR0RZAXausIYJ7K8RTo4DWSyQNMcWgNHBMzGB6TuMx6o7RBedlio4NkCXxuEeuVpDH_8d6z5fmNTzXbUy0n0LRH0D0pyZ5B8prc7COUM7uLK9TUGtpx.ZnYFUX74TePxPuBhEy_cNCin8xMbY5 X-Yahoo-Newman-Property: ymail-3 Message-ID: <005e01ca267a$ca5eda80$6d01a8c0@CSDSML> From: "stephen att" To: Subject: PROBLEMS COMPILING DPMI APPLICATION - LIBRARY ROUTINES NOT FOUND Date: Wed, 26 Aug 2009 11:26:54 -0700 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_005A_01CA2640.1D94BD90" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.3598 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 Reply-To: djgpp AT delorie DOT com This is a multi-part message in MIME format. ------=_NextPart_000_005A_01CA2640.1D94BD90 Content-Type: multipart/alternative; boundary="----=_NextPart_001_005B_01CA2640.1D94BD90" ------=_NextPart_001_005B_01CA2640.1D94BD90 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I have a very large application which uses DPMI and I can't get it to = compile with DJGPP - I always get "undefined reference" fatal errors. = "__dpmi_int" is always identified as such a reference although I am = including the correct header file and the compile include directive - = the command line I use is: gcc testdpmi.c -o a.exe -I c:\djgpp\include I believe the dmpi library calls are in liba so this shouldn't be = happening; can you help? FULL TEXT OF COMPILE MESSAGES gcc testdpmi.c -o a.exe -I c:\djgpp\include C:\DOCUME~1\sml\LOCALS~1\Temp/ccSAcaaa.o:testdpmi.c:(.text+0x6d): = undefined refe rence to `__dpmi_int' C:\DOCUME~1\sml\LOCALS~1\Temp/ccSAcaaa.o:testdpmi.c:(.text+0x8b): = undefined refe rence to `translate_keypad' collect2: ld returned 1 exit status I include the test source file also stephen mckinnon ------=_NextPart_001_005B_01CA2640.1D94BD90 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
I have a very large application which uses DPMI and = I can't=20 get it to compile with DJGPP - I always get "undefined reference" fatal = errors.=20 "__dpmi_int" is always identified as such a reference although I am = including=20 the correct header file and the compile include directive - the command = line I=20 use is:
 
gcc testdpmi.c -o a.exe -I = c:\djgpp\include
 
I believe the dmpi library calls are in liba so this = shouldn't=20 be happening; can you help?
 
FULL TEXT OF COMPILE MESSAGES
gcc testdpmi.c -o a.exe -I=20 c:\djgpp\include
C:\DOCUME~1\sml\LOCALS~1\Temp/ccSAcaaa.o:testdpmi.c:(= .text+0x6d):=20 undefined refe
rence to=20 `__dpmi_int'
C:\DOCUME~1\sml\LOCALS~1\Temp/ccSAcaaa.o:testdpmi.c:(.tex= t+0x8b):=20 undefined refe
rence to `translate_keypad'
collect2: ld returned 1 = exit=20 status
 
I include the test source file also
 
stephen = mckinnon
------=_NextPart_001_005B_01CA2640.1D94BD90-- ------=_NextPart_000_005A_01CA2640.1D94BD90 Content-Type: application/octet-stream; name="testdpmi.c" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="testdpmi.c" #include #include #include main(argc,argv) int argc; char *argv[]; { char input; printf("begining loop - type # to exit program\nfirst>"); for( input = rgetchar(); input != '#'; printf("next>") ) ; return; } /* ================== PUBLIC FUNCTIONS ================== */ /* Returns a keystroke, translated into a Rogue command. */ rgetchar() { char ch; register scancode; __dpmi_regs regs; for(;;) { regs.h.ah = 0x00; /* get keystroke */ __dpmi_int(0x16, ®s); scancode = regs.h.ah; /* BIOS scancode */ if(scancode>0x46 && scancode<0x54) ch = translate_keypad(scancode); else ch = regs.h.al; /* ASCII code */ switch(ch) { case '\022': /* ^R */ printf("refresh the screen\n"); break; case '&': printf("save the screen\n"); break; default: return(ch); } } } ------=_NextPart_000_005A_01CA2640.1D94BD90--