Hi Alan, Werner, On 2010-08-13 17:12, Alan W. Irwin wrote:
> > To Arjen and Werner: > > Is the calling convention also going to be an issue for our visibility > support? > > Right now (in include/pldll.h(.in) we use > > #define PLDLLEXPORT __declspec( dllexport ) > > for both non-Cygwin and Cygwin windows. But I have noticed that for > the libharu symbol visibility support (see > cmake/external/libharu/include/hpdf.h) they use > > #ifdef HPDF_DLL_MAKE > # define HPDF_EXPORT(A) __declspec(dllexport) A __stdcall > #else > # ifdef HPDF_DLL_MAKE_CDECL > # define HPDF_EXPORT(A) __declspec(dllexport) A > [...] > > where "A" is the function type and HPDF_DLL_MAKE_CDECL is defined in > the Cygwin case and HPDF_DLL_MAKE defined in the non-Cygwin Windows > case. > > Note, I don't understand Windows symbol visibility syntax at all, but > the implication from the name of the macro in the Cygwin case and the > use of __stdcall in the non-Cygwin Windows case is that Cygwin uses > the "cdecl" calling convention (whatever that is) and non-Cygwin > Windows uses "stdcall" calling convention (whatever that is). > > In sum, it appears the libharu developers were unaware of the cdecl > calling convention for the Intel compiler, but they do appear to > distinguish the two calling conventions in their visibility support so > we might want to consider doing that ourselves (by adding the > __stdcall attribute for the stdcall case). > > Even more importantly, if Cygwin really does use the cdecl calling > convention it appears from Arjen's comments above there would be > widespread Cygwin fortran implications (which may explain why fortran > has historically been problematic for PLplot on Cygwin). > > I am out of my depth so I am just mentioning some possibilities here > based on what libharu does to give you guys some food for thought. > I am positive the visibility (the __declspec(ddlimp/export) attribute) is NOT influenced by the __stdcall issue. They are orthogonal matters (wonderful word). That is evidenced by the fact that we need BOTH to get the right linkage for Compaq Visual Fortran, for instance. Regards, Arjen DISCLAIMER: This message is intended exclusively for the addressee(s) and may contain confidential and privileged information. If you are not the intended recipient please notify the sender immediately and destroy this message. Unauthorized use, disclosure or copying of this message is strictly prohibited. The foundation 'Stichting Deltares', which has its seat at Delft, The Netherlands, Commercial Registration Number 41146461, is not liable in any way whatsoever for consequences and/or damages resulting from the improper, incomplete and untimely dispatch, receipt and/or content of this e-mail. ------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel