delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/07/09/06:31:02

From: "Patrick Chen" <pck66 AT pd DOT jaring DOT my>
Newsgroups: comp.os.msdos.djgpp
Subject: DJCPP linking errors.
Date: Tue, 9 Jul 2002 17:02:33 +0800
Organization: Unconfigured
Lines: 41
Message-ID: <age8re$e54$1@news4.jaring.my>
NNTP-Posting-Host: j44.sgw46.jaring.my
X-Trace: news4.jaring.my 1026205358 14500 161.142.191.58 (9 Jul 2002 09:02:38 GMT)
X-Complaints-To: usenet AT news4 DOT jaring DOT my
NNTP-Posting-Date: 9 Jul 2002 09:02:38 GMT
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

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,&regs,&regs);
}

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?

Thank you

Patrick


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019