Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
24 Views

using COMPAQ Fortran dll in C# code

I am developing a C# extension dll in VS 2010, using fortran dll having Intel fortran compiler. this fortran dll code does uses IMSL DIVPAG solvers in code. when i am using COMPAQ compiler based fortran dll which also uses DIVPAG solvers from IMSL library, in C# extension development, facing some issue, where my c# code does not get connected to this fortran dll or getting crashed. How fortran compiler is making an issue, where i am only using dll in C#. How to solve this issue please tell me. Thanks in advance.

0 Kudos
1 Reply
Highlighted
Black Belt
24 Views

CVF and Intel Fortran use different default linkage conventions: STDCALL and CREF, with some nuances regarding character string arguments. The IMSL library versions matched to these compilers also differ in the same way.

Within some limits, you can ask each of these two compilers to generate code using a non-default convention, but there will be additional problems related to (i) routines such as IVPAG call back a user-provided function/subroutine that contains the code for the specific ODE being integrated, and (ii) incompatibilities in the run-time libraries expected by the user parts of the code and the IMSL library code. 

Unless there are special circumstances, it is inadvisable to attempt to do cross-link one compiler's output with the other's IMSL library. Your situation adds to the complications by calling from a third environment: C#/.NET.

MODERATOR: Please move this thread to the Intel Visual Fortran Compiler for Windows forum.

0 Kudos