Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.

"global" !DEC$ ATTRIBUTES STDCALL

andrew_4619
Honored Contributor I
136 Views

In another thread we were looking at OpenGL (GLU) interfaces and I was looking at one of my own API interface modules. This module uses  BIND(C,name='xxxx') and in every interface we have "!DEC$ ATTRIBUTES STDCALL :: Func_or_sub_name. It occurred that is would be much neater and easier to have a global STDCALL attribute for the source file (or module scope) but is would seem this is not an option.

You can have !DEC$ ATTRIBUTES STDCALL :: name1, name2, name3 but that is a worse option in terms of code maintenance.

Is there any way of doing this? I would not do it via compiler option as I think that is quite error prone method.

0 Kudos
1 Reply
Steven_L_Intel1
Employee
136 Views

No, it's not an option. I think that the general usefulness of such a thing is minimal, even more so as 32-bit support starts to disappear. How often would you use this outside of Windows API declarations? Note that we do now support ATTRIBUTES STDCALL combined with BIND(C).

Reply