I am using Visual Studio Express 2008 for C# and am trying to call a FTN95 DLL from C#.
The FTN95 help section “Net platform/.NET programming/Calling Fortran from other .NET languages” seems to say that such a DLL can be generated from command-line FTN95 using DBK_LINK2, with ASSEMBLY_INTERFACE inserted in each Fortran subroutine to be called.
Following the help’s example, I produced the simplest one-subroutine pi.dll file with an argument comprising one scalar integer and one scalar real*8 (int and double on the C# end). When I add this DLL to the C# project and call the subroutine from C# as shown in the help, I get the exception:
“Unable to load DLL 'pi.dll': The application has failed to start because its side-by-side configuration is incorrect.”
This also happens when running the C# project under the full Visual Studio Professional 2008. I am missing something critical. Any ideas? Thanks.