From: Martin Str|mberg Subject: Re: DJCPP linking errors. Newsgroups: comp.os.msdos.djgpp References: User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (NetBSD/1.5_BETA (alpha)) Message-ID: <1026224876.534743@queeg.ludd.luth.se> Cache-Post-Path: queeg.ludd.luth.se!unknown AT speedy DOT ludd DOT luth DOT se X-Cache: nntpcache 2.4.0b5 (see http://www.nntpcache.org/) Date: 09 Jul 2002 14:27:56 GMT Lines: 43 NNTP-Posting-Date: 09 Jul 2002 14:27:56 GMT NNTP-Posting-Host: queeg.ludd.luth.se X-Trace: 1026224876 news.luth.se 468 130.240.16.109 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Patrick Chen wrote: : 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); : DrawCircle.c file: : 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? How about #including draw_plot.h in DrawCircle.c? Right, MartinS