delorie.com/archives/browse.cgi | search |
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" <stephenmck AT att DOT net> |
To: | <djgpp AT delorie DOT com> |
Subject: | PROBLEMS COMPILING DPMI APPLICATION - LIBRARY ROUTINES NOT FOUND |
Date: | Wed, 26 Aug 2009 11:26:54 -0700 |
MIME-Version: | 1.0 |
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 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Diso-8859-1"> <META content=3D"MSHTML 6.00.2900.3603" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT size=3D2> <DIV><FONT size=3D2>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:</FONT></DIV> <DIV><FONT size=3D2></FONT> </DIV> <DIV><FONT size=3D2>gcc testdpmi.c -o a.exe -I = c:\djgpp\include</FONT></DIV> <DIV><FONT size=3D2></FONT> </DIV> <DIV><FONT size=3D2>I believe the dmpi library calls are in liba so this = shouldn't=20 be happening; can you help?</FONT></DIV> <DIV><FONT size=3D2></FONT> </DIV> <DIV><FONT size=3D2>FULL TEXT OF COMPILE MESSAGES</FONT></DIV> <DIV><FONT size=3D2>gcc testdpmi.c -o a.exe -I=20 c:\djgpp\include<BR>C:\DOCUME~1\sml\LOCALS~1\Temp/ccSAcaaa.o:testdpmi.c:(= .text+0x6d):=20 undefined refe<BR>rence to=20 `__dpmi_int'<BR>C:\DOCUME~1\sml\LOCALS~1\Temp/ccSAcaaa.o:testdpmi.c:(.tex= t+0x8b):=20 undefined refe<BR>rence to `translate_keypad'<BR>collect2: ld returned 1 = exit=20 status</FONT></DIV> <DIV><FONT size=3D2></FONT> </DIV> <DIV><FONT size=3D2>I include the test source file also</FONT></DIV> <DIV><FONT size=3D2></FONT> </DIV> <DIV><FONT size=3D2>stephen = mckinnon</FONT></DIV></FONT></DIV></BODY></HTML> ------=_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 <stdio.h> #include <dpmi.h> #include <go32.h> 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--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |