Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28456 Discussions

C interoperability and 32- vs 64-bit DLLs

avinashs
New Contributor I
501 Views

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
Steve_Lionel
Honored Contributor III
482 Views

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.

0 Kudos
avinashs
New Contributor I
454 Views

Thank-you. That clarifies my question.

0 Kudos
Reply