replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - Calling a FTN95 DLL from C#
forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Calling a FTN95 DLL from C#

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
bstott



Joined: 03 Apr 2008
Posts: 12

PostPosted: Tue May 18, 2010 11:41 pm    Post subject: Calling a FTN95 DLL from C# Reply with quote

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
View user's profile Send private message
Robert



Joined: 29 Nov 2006
Posts: 457
Location: Manchester

PostPosted: Fri May 21, 2010 6:58 am    Post subject: Reply with quote

Brian

What a horrible error message. Have you installed Visual Studio 2008 SP1?
http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/62b42380-caf9-4a5c-8789-17c841382a25
Back to top
View user's profile Send private message Visit poster's website
bstott



Joined: 03 Apr 2008
Posts: 12

PostPosted: Fri May 21, 2010 11:07 pm    Post subject: Reply with quote

Hi Robert. Both my Visual Studio C# Express 2008 and my colleague's full Visual Studio 2008 have SP1.
Back to top
View user's profile Send private message
Robert



Joined: 29 Nov 2006
Posts: 457
Location: Manchester

PostPosted: Tue May 25, 2010 8:24 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group