在CentOS中从运行在mono下的.NET应用程序调用本机linux库时,IL代码无效

在CentOS中从运行在mono下的.NET应用程序调用本机linux库时,IL代码无效,.net,linux,mono,dllimport,.net,Linux,Mono,Dllimport,我正在尝试在多平台环境中使用英特尔MKL库。我的DllImports和wrapper类在.NET/Windows下工作。然而,当我把它移植到CentOS时,我得到了“无效的IL代码” 我已经更改了DLLImports,以包含linux版本的MKL(一个.so库)。我添加了LD_LIBRARY_PATH环境变量。不过,该错误不会改变库是否存在。我没有得到DLLNotFound错误,我得到一个无效的IL错误 下面我粘贴我的窗口,使用dllimport语句 [DllImport("mkl_rt.dll

我正在尝试在多平台环境中使用英特尔MKL库。我的DllImports和wrapper类在.NET/Windows下工作。然而,当我把它移植到CentOS时,我得到了“无效的IL代码”

我已经更改了DLLImports,以包含linux版本的MKL(一个.so库)。我添加了LD_LIBRARY_PATH环境变量。不过,该错误不会改变库是否存在。我没有得到DLLNotFound错误,我得到一个无效的IL错误

下面我粘贴我的窗口,使用dllimport语句

[DllImport("mkl_rt.dll", ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)]
    internal static extern int DftiCreateDescriptor(
        ref IntPtr handle_descriptor,
        int precision,
        int domain,
        int dime,
        int size
    );
下面是我为linux提出的建议

[DllImport("libmkl_rt.so", CallingConvention = CallingConvention.Cdecl)]
    private static extern int DftiCreateDescriptor(
        ref IntPtr handle_descriptor,
        int precision,
        int domain,
        int dime,
        int size
    );

最终,通过不使用_arg_list并使用Mono.config文件解决了这个问题