comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: g++ with IDL call_external
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: g++ with IDL call_external [message #45838] Tue, 11 October 2005 19:05 Go to previous message
tdaitx is currently offline  tdaitx
Messages: 5
Registered: July 2005
Junior Member
As Nigel said, C++ compilers mangle functions name differently than C
compilers, since they have to support function overloading. You should
use

#ifdef __cplusplus
extern "C" {
#endif
<all your C prototype code goes here>
#ifdef __cplusplus
}
#endif

and you'll be able to compile it with both gcc and g++.

You should really take a look at
http://developers.sun.com/prodtech/cc/articles/mixing.html and
http://www.parashift.com/c++-faq-lite/mixing-c-and-cpp.html, both an
excellent source on how to mix C and C++ code.

Regards,
Tiago S Daitx
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: group leader for iTools
Next Topic: Re: measuring lines

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:19:30 PDT 2025

Total time taken to generate the page: 0.00237 seconds