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

Home » Public Forums » archive » calling function in DLL compiled with C++
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: calling function in DLL compiled with C++ [message #28857 is a reply to message #28798] Mon, 14 January 2002 00:01 Go to previous messageGo to previous message
Dominik[1] is currently offline  Dominik[1]
Messages: 46
Registered: April 2001
Member
Hi Richard,

I allready tried the extern C construct. But then I got some problems, using
other C++ routines in the DLL.
So, this method didnt work for me.

But Gregs suggestion was ok. The DLL is running now, thanks
Dom



"Richard Younger" <younger@ll.mit.edu> schrieb im Newsbeitrag
news:3C3E119B.8A355D5B@ll.mit.edu...
> Dominik Paul wrote:
>>
>> Hi NG,
>>
>> I tried to write a DLL suing C++. But I have a big problem,
>> calling the function in the DLL out of IDL, when the DLL is
>> compiled using a C++-compiler.
> [...]
>>
>> Dom
>
> Hi, Dom.
>
> Are you still having trouble? I've got a few examples lying around for
> VC++, but I don't know what compiler you're using. I certainly second
> Gert's suggestion about using .def files if you're in VC++.
>
> If things still aren't working, you can use the extern "C" construct to
> force your C++ compiler to use C names and calling conventions in most
> compilers.
>
> Just add something like
>
>
> #ifdef __cplusplus
> extern "C" {
> #endif
>
> /* C callable prototypes here */
>
> #ifdef __cplusplus
> }
> #endif
>
>
> to your header file around IDL_load() or the externally visible
> functions. More info at
> <http://www.parashift.com/c++-faq-lite/mixing-c-and-cpp.html>.
>
>
> Best,
> Rich
>
> --
> Richard Younger
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: idl5.5 widget_draw and color
Next Topic: All day FFT....

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

Current Time: Fri Oct 10 14:00:09 PDT 2025

Total time taken to generate the page: 0.24140 seconds