X-Originating-IP: [200.34.143.5] From: "J. L." To: References: Subject: Re: DJCPP linking errors. Date: Tue, 9 Jul 2002 12:12:59 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 Message-ID: X-OriginalArrivalTime: 09 Jul 2002 17:13:08.0002 (UTC) FILETIME=[E531B820:01C2276B] Reply-To: djgpp AT delorie DOT com ----- Original Message ----- From: "Patrick Chen" Newsgroups: comp.os.msdos.djgpp To: Sent: Tuesday, July 09, 2002 4:02 AM Subject: DJCPP linking errors. > Hello Folks, > I face the linking errors for the object files of > draw_plot.c(library), DrawCircle.c. But individual compilation of each > source files gave no errors: > > draw_plot.c file: > (part of program) > #include "draw_plot.h" > void vid_mode(byte_t mode){ > union REGS regs; > regs.h.ah = 0; > regs.h.al = mode; > int86(0x10,®s,®s); > } > > draw_plot.h file: > typedef unsigned char byte_t; > byte_t* double_buffer; > .. > extern void > vid_mode(byte_t mode); You are cuting the contents of file. Are you sure that there are another line (in another file) with the prototype of vid_mode()? > > DrawCircle.c file: Like Martin wrote, you need include draw_plot.h > int main() { > .. > vid_mode(0x13); > .. > } > > Link Errors: > draw_plot.o: > draw_plot.c: multiple definition of "_vid_mode" > > Other functions in the library face the link error messages. > What is wrong and how to solve this challenge? > > Thank you > > Patrick > > Again, revise your code for another line like extern void vid_mode(byte_t mode);