1
$\begingroup$

I am following unstable's wonderful answer on .NET and fortran.

I can reproduce his result using gfortran without problem. But I want to use Intel Fortran, because gfortran generates slower code on my computer.

All the other steps are the same, only the dll is generated by the following command

ifort /dll testfunction.f90

After I install .NET and load the dll, running TestFunction[{1.0, 2.0}, 3.0] gives me errors.

NET::netexcptn: A .NET exception occurred: System.EntryPointNotFoundException: 无法在 DLL"D:\w\WORK\mathematica\NET\testfunction.dll"中找到名为"testfunction_"的入口点。 在 Wolfram.NETLink.DynamicDLLNamespace.DLLWrapper1.testfunction_(Double[] , Double& ).

The Chinese part seems to say that it can't find the entrance point named "testfunction_"

How can I solve this?

$\endgroup$
2
  • $\begingroup$ Different Fortran compilers follow different name mangling specifications. This is most likely the problem you face here. $\endgroup$ Jan 17, 2016 at 16:45
  • $\begingroup$ @OleksandrR. Hi,OleksandrR. I know intel fortran will uppercase all the subroutine name. But change the name also didn't work. How to solve this? $\endgroup$
    – matheorem
    Jan 18, 2016 at 5:32

0

Browse other questions tagged or ask your own question.