- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a Fortran project with calling convention CVF specified in project properties, which I understand equates to stdcall except CVF passes scalars by reference. Fortran calls a C++ function which uses cdecl. I am using BIND(C) attribute which I am assuming defaults to cdecl. If I change the C++ convention to stdcall, do I have to declare !DEC$ ATTRIBUTES REFERENCE, STDCALL, ALIAS: 'Init' :: Init in the function block, or is there an alternative to BIND(C) which works for stdcall?
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We do not allow the use of ATTRIBUTES STDCALL with BIND(C). If you are calling STDCALL routines, you'll need to use ATTRIBUTES to specify everything as you show it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Steve Lionel (Intel)
We do not allow the use of ATTRIBUTES STDCALL with BIND(C). If you are calling STDCALL routines, you'll need to use ATTRIBUTES to specify everything as you show it.
Thank you for the swift response!

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page