delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/05/03/10:22:53

Date: Tue, 3 May 94 10:05:52 EDT
From: peprbv AT cfa0 DOT harvard DOT edu (Bob Babcock)
To: wymanm AT cork DOT cig DOT mot DOT com
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: Problem with GAS :)
Reply-To: babcock AT cfa DOT harvard DOT edu

> I have some functions written in GAS format that I used fine with
> the C compiler.  However, when I switched over to doing C++ I
> can't get the compiler to recognize the assembly functions.

C++ mangles the names, so you have to modify your prototype to tell the
compiler that these are C functions.  You'll find some examples of how to do
this in some of the djgpp include files.  They look something like this:

#ifdef __cplusplus
   extern "C" void foo (int);
#else
   void foo (int);
#endif

- Raw text -


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