www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/04/14/23:16:42

From: Joseph Rose <jorose AT mail DOT gis DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Problems linking
Date: Fri, 14 Apr 2000 18:44:35 -0400
Organization: Posted via Supernews, http://www.supernews.com
Lines: 69
Message-ID: <38F79F53.4700890F@pop.gis.net>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 1000412171857 DOT 18962C-100000 AT is> <38F71722 DOT E1E54447 AT pop DOT gis DOT net> <38F75621 DOT E787315E AT is DOT elta DOT co DOT il>
X-Complaints-To: newsabuse AT supernews DOT com
X-Mailer: Mozilla 4.7 [en]C-NECCK (Win98; I)
X-Accept-Language: en
MIME-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Eli Zaretskii wrote:

> Joseph Rose wrote:
> >
> > Eli Zaretskii wrote:
> >
> > > Please post one example of the command you used to compile/link and the
> > > error messages that the compiler prints.  Then someone will figure out
> > > what your problems are.
> >
> > In RHIDE, the Options|Linker/Compiler Options menu options are blank.
>
> What about the exact text of the error messages?  What did that say?

The error text is as follows:

Creating: TestGr.exe
Error: ../../zzz/gr/386p/TestGr.o: In function `main':
TestGr.c(14) Error: undefined reference to `SetGrMode'
TestGr.c(16) Error: undefined reference to `Draw_Line_Horiz'
TestGr.c(17) Error: undefined reference to `Draw_Line_Horiz'
Error: collect2: ld returned 1 exit status


The test and header code follow:
-------------------------------------------
VGADr386.h
/*
//Header for VGADr386 library.
//Requires dpmi.h.
*/

 __dpmi_paddr VidBuffer;
 char TmpVidBuffer [64000];
 extern void SetGrMode (void);
 extern void Draw_Line_Horiz (int X, int Y, int Len, char Col);
 void Draw_Line_Vert (long X, long Y, short Len, char Col);
 void Draw_Tri (long X1, long Y1, long X2, long Y2, long X3, long Y3, char
Col);

-----------------------------------------------
TestGr.c
#include <dos.h>
#include <dpmi.h>
#include <VGADr386.h>

/*using namespace Graphics_2D;*/
int main (void)
{
 int A;
 union REGS Reg;
/* Reg.w.ax=0x13;
 int86 (0x10,&Reg,&Reg);
 __asm ("movw %ax,0x13");
 __asm ("int 0x10");*/
 SetGrMode();
 printf ("","Test");
 Draw_Line_Horiz (0, 10, 32, 15);
 Draw_Line_Horiz (2,20,32,15);
/* Draw_Line_Horiz(310,30,32,15);
 Draw_Tri (160,100,200,150,180,140,15);*/
 sleep (3);
 Reg.w.ax=0x3;
 int86 (0x10,&Reg,&Reg);
 return 0;
};



- Raw text -


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