Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
26739 Discussions

C interoperability and 32- vs 64-bit DLLs

New Contributor I

When writing/building C interoperability routines, does the compiler automatically take 32-bit vs 64-bit into account based on the project settings? My question is related to building interoperable dlls that will also be called by Excel VBA, which is different for 32-bit Office and 64-bit Office. Especially for arrays, the type of pointer passed is different. Hence, I was wondering whether the build step of the 32-bit interoperable Fortran dll will automatically accept the corresponding pointer from VBA and likewise for the 64-bit Fortran dll.

Will add that I am having some trouble getting my 64-bit dlls to work but that is not necessarily related to this question.

0 Kudos
2 Replies
Black Belt Retired Employee

If you're referring to some of the KIND values defined in ISO_C_BINDING, yes, these differ between a 32-bit compile and a 64-bit compile. Types such as C_PTR are also the correct size.

New Contributor I

Thank-you. That clarifies my question.