Mail Archives: djgpp/2002/07/09/14:16:40
X-Originating-IP: | [200.34.143.5]
|
From: | "J. L." <jlsgarrido AT hotmail DOT com>
|
To: | <djgpp AT delorie DOT com>
|
References: | <age8re$e54$1 AT news4 DOT jaring DOT my>
|
Subject: | Re: DJCPP linking errors.
|
Date: | Tue, 9 Jul 2002 12:12:59 -0500
|
MIME-Version: | 1.0
|
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: | <OE46gYBr4BvRnfvcySa00000481@hotmail.com>
|
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" <pck66 AT pd DOT jaring DOT my>
Newsgroups: comp.os.msdos.djgpp
To: <djgpp AT delorie DOT com>
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);
- Raw text -