| www.delorie.com/archives/browse.cgi | search |
| From: | Martin Str|mberg <ams AT speedy DOT ludd DOT luth DOT se> |
| Subject: | Re: DJCPP linking errors. |
| Newsgroups: | comp.os.msdos.djgpp |
| References: | <age8re$e54$1 AT news4 DOT jaring DOT my> |
| 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 <pck66 AT pd DOT jaring DOT my> 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
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |