View previous topic :: View next topic |
Author |
Message |
bstott
Joined: 03 Apr 2008 Posts: 12
|
Posted: Tue May 18, 2010 11:41 pm Post subject: Calling a FTN95 DLL from C# |
|
|
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. |
|
Back to top |
|
 |
Robert

Joined: 29 Nov 2006 Posts: 457 Location: Manchester
|
|
Back to top |
|
 |
bstott
Joined: 03 Apr 2008 Posts: 12
|
Posted: Fri May 21, 2010 11:07 pm Post subject: |
|
|
Hi Robert. Both my Visual Studio C# Express 2008 and my colleague's full Visual Studio 2008 have SP1. |
|
Back to top |
|
 |
Robert

Joined: 29 Nov 2006 Posts: 457 Location: Manchester
|
Posted: Tue May 25, 2010 8:24 am Post subject: |
|
|
Everything I read on the subject suggests it is a problem with the Visual C++ redistribution set which is fixed in SP1 - and it seem a bit odd it affects both machines. Can you send your project to ftn95@silverfrost.com so we can at least test the compiler's output. |
|
Back to top |
|
 |
|