Board index » cppbuilder » DLL Wizard - 'C' or 'C++' Source type?

DLL Wizard - 'C' or 'C++' Source type?


2003-10-23 09:22:50 AM
cppbuilder111
Hi,
If I would like to make my DLL compatible with other compilers, should I
choose 'C' or 'C++' source type when creating the DLL using the DLL
Wizard, please?
Thanks very much for your help in advance.
Prem.
 
 

Re:DLL Wizard - 'C' or 'C++' Source type?

"Prem" < XXXX@XXXXX.COM >wrote in message
Quote
If I would like to make my DLL compatible with other
compilers, should I choose 'C' or 'C++' source type when
creating the DLL using the DLL Wizard, please?
It does not matter, since those compilers are not going to have access to
the DLL's internals one way or another. The thing that does matter,
however, is how you export functions, since those are what the applications
are going to actually be using. For best compatibility, always use the
__stdcall calling convention and only use native data types. In the case of
C++ code, you'll also need to wrap the exports with extern "C".
Gambit