Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Novice
5 Views

Problem Passing Data Structure to Fortran DLL

I'm trying to pass an integer and a data structure to a subroutine in an external DLL but I'm having a compiler problem with the data structure I'm trying to pass. The compiler error message is "Error #6633: The type of the actual argument differs from the type of the dummy argument [PDATA]" but I can't see why. The error message relates to the "CALL pMKL(1,pData)" line.

​I would also like to know how to avoid declaring my data structure twice.

Finally, is there an easier way to call a function in a DLL if the DLL and the calling program are both Intel Fortran?

My test source code is attached. I apologise in advance if this is a dumb question.

0 Kudos
2 Replies
Highlighted
New Contributor II
5 Views

To avoid declaring twice use

To avoid declaring twice use the IMPORT statement inside the astract procedure interface.

Even though you declarations match the compiler sees them as different declarations and hence the mismatched argument type.

0 Kudos
Highlighted
Novice
5 Views

Thanks, that fixed it.

Thanks, that fixed it.

0 Kudos