www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/04/30/19:15:16

From: Andrew Crabtree <andrewc AT typhoon DOT rose DOT hp DOT com>
Message-Id: <199704302259.AA075861197@typhoon.rose.hp.com>
Subject: Re: C++ and Assembler
To: ma6djh AT bath DOT ac DOT uk (D J Hampson)
Date: Wed, 30 Apr 1997 15:59:57 PDT
Cc: djgpp AT delorie DOT com
In-Reply-To: <E9B6tt.1qy.C.amo@bath.ac.uk>; from "D J Hampson" at Apr 27, 97 6:17 pm

> I've just realised that when you compile C++ it gives functions different 
> names like _MyFunc_Fss (ss standing for short short), rather than just 
> _MyFunc. This makes sense for overloading and stuff, but doesn't it mean 
> that C++ is incompatible with Assembler built for C?
> 
> If I put MyFunc(short,short) in C, and then _MyFunc in Asm, how do I make 
> it compile correctly under C and C++? (How do I make C++ look for a 
> function called _MyFunc rather than _MyFunc_Fss?)

I think this is pretty common in header files for C functions that
you want to be C++ callable.


#ifdef __cplusplus
extern "C" {
#endif

/* prototypes here */



#ifdef __cplusplus
};
#endif

- Raw text -


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