Mail Archives: djgpp/1997/05/02/14:41:45
David Hampson wrote:
[Snip]
>
>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?)
>
Hi David,
Where you declare your function prototypes try putting the following
around them
-----> Cut here <-----
#ifdef __cplusplus
extern "C" {
#endif
/* Function prototypes go here */
void MyFunc(short, short);
#ifdef __cplusplus
}
#endif
-----> Cut here <-----
This will tell the C++ compiler to treat the functions using the C naming
convention.
Hope that helps
John
________________________________________________________________
Parallax Solutions Ltd. Tel.: 01203 514522
Stonecourt, Fax.: 01203 514401
Siskin Drive, Web : http://www.parallax.co.uk/~johne
Coventry CV3 4FJ Mail: johne AT parallax DOT co DOT uk
________________________________________________________________
Remember:
There is no such thing as computer error, it's 100% YOUR fault
________________________________________________________________
- Raw text -