X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: "xingqk" Newsgroups: comp.os.msdos.djgpp Subject: compile problem using djgpp with nasm Date: Fri, 2 Apr 2004 11:10:55 +0800 Organization: Bentium Ltd. (CN99) Lines: 53 Message-ID: NNTP-Posting-Host: 61.48.9.17 X-Trace: mail.cn99.com 1080875545 36929 61.48.9.17 (2 Apr 2004 03:12:25 GMT) X-Complaints-To: usenet AT news DOT cn99 DOT com NNTP-Posting-Date: Fri, 2 Apr 2004 03:12:25 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4927.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4927.1200 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Under DOS system using djgpp with nasm ,I'm tring to link two file together, one is sys.o: (nasm -f coff sys.asm -o sys.o) anther is clock.o: (gcc -Wall -ansi -pedantic-errors -nostdinc -fno-builtin -I ../include kernel -c clock.c -o clock.o) then link two file use ld,but produce the error: clock.o(.text+0x2c):clock.c:undefined reference to `outb' clock.o(.text+0x39):clock.c:undefined reference to `inb' because these file have been compiled successfully under LINUX (gcc nasm ),so the include file can not be wrong , I guess maybe the path symbol ¡°/¡±should be changed to ¡°\¡±,but not (djgpp recognized the symbol ¡°\¡±). I also add ¡°_¡± before the symbol inb and outb in the file sys.asm, but it doesn¡¯t work.. I list the symbol table of sys.o using the commond: nm sys.o Then displaying the following information: 00000000 a .absolut 00000000 t .text U _inb U _ind U _inw U _outb U _outd U _outw I found _inb and _outb are undefined type and have no address. Why?? I am confused! Who can tell me please, thanks a lot.