Mail Archives: djgpp/2000/04/28/16:26:39
AFAIK you should add some characters to your external ASM subroutines... These
characters must represent type of passed parameters. I don't remember how
exactly, but that might help you. I don't add these chracters with plane C, but
parhaps they are needed for C++.
--
Alexei A. Frounze
-----------------------------------------
Homepage: http://alexfru.chat.ru
Mirror: http://members.xoom.com/alexfru
Joseph Rose wrote:
>
> Just before my last message, I put 'extern' before the prototypes of the asm
> functions in my header. I forgot to post the header. It follows.
>
> -----------------------
> /*
> //Header for VGADr386 library.
> //Requires dpmi.h.
> */
> #ifndef _VGADraw_internal
> extern short VidSel;
> extern __dpmi_paddr VidBuffer;
> extern char TmpVidBuffer [63999];
> #endif
> extern void SetGrMode (void);
> extern void Draw_Line_Horiz (int X, int Y, int Len, char Col);
> extern void Draw_Line_Vert (long X, long Y, short Len, char Col);
> extern void Draw_Tri (long X1, long Y1, long X2, long Y2, long X3, long Y3,
> char Col);
>
> --------------------------------
>
> Hans-Bernhard Broeker wrote:
>
> > In article <39096460 DOT 1D069B39 AT pop DOT gis DOT net> you wrote:
> > > When I link the test code for my graphics library, I get no error
> > > message on references to C++ functions, but I get 'undefined reference'
> > > error messages at every line of C++ code containing a function call to
> > > an assembler routine. I'm using nasm; GLOBAL statements appear at the
> > > beginning of the source for about every function in the source without
> > > any extra specifiers, and my functions start with just a label followed
> > > by a colon. Every other technique I've tried didn't assemble at all.
> >
> > Unless my memory fails me even more badly than usually, I've already
> > answered that question, answering an earlier posting of yours:
> >
> > You need 'extern "C"' qualifiers in the prototypes for those
> > assembly functions.
> >
> > --
> > Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
> > Even if all the snow were burnt, ashes would remain.
- Raw text -