Mail Archives: djgpp/2000/04/14/23:16:42
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 -