www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/04/28/16:26:39

From: "Alexei A. Frounze" <alex DOT fru AT mtu-net DOT ru>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: 3rd Try: Maybe an asm problem? (Problems linking)
Date: Fri, 28 Apr 2000 22:49:58 +0400
Organization: MTU-Intel ISP
Lines: 57
Message-ID: <3909DD56.7BD63105@mtu-net.ru>
References: <200004281112 DOT NAA29833 AT acp3bf DOT physik DOT rwth-aachen DOT de> <3909D92B DOT CC80284C AT pop DOT gis DOT net>
NNTP-Posting-Host: ppp101-99.dialup.mtu-net.ru
Mime-Version: 1.0
X-Trace: gavrilo.mtu.ru 956949730 87795 212.188.101.99 (28 Apr 2000 19:22:10 GMT)
X-Complaints-To: usenet-abuse AT mtu DOT ru
NNTP-Posting-Date: 28 Apr 2000 19:22:10 GMT
X-Mailer: Mozilla 4.72 [en] (Win95; I)
X-Accept-Language: en,ru
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

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 -


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