关于C#调用fortran的dll,奇怪的问题
我用fortran生成dll
subroutine QPF6h(begin_t,f_m_in,f_r_in)
use IMSL
use global
use setup
use grid_num
!DEC$ attributes DLLEXPORT,ALIAS: 'callRef'::QPF6h
!DEC$ attributes value::begin_t
………………
End
在c#中调用如下
using System.Runtime.InteropServices;
namespace QPF
{
class Program
{
[DllImport("QPFdll.dll")]
public static extern void callRef(int t, string fname_m, int l1, string fname_r, int l2);
……
……
……
编译正确,并且在xp系统下运行通过,但是将程序放到2000系统下就出错,提示如下:
未处理的异常: System.DllNotFoundException: 无法加载 DLL“QPFdll.dll”: 找不到指
定的模块。 (异常来自 HRESULT:0x8007007E)。
在 QPF.Program.callRef(Int32 t, String fname_m, Int32 l1, String fname_r, Int32
l2)
在 QPF.Program.Main(String[] args)
另外,我用的fortran编译器是cvf6.5,c#编译器是vs2008,请教各位怎么解决(程序要放在2000的服务器上运行)?