Calling Fortran from Python

I had this working fine last year. I am calling my Intel Fortran DLL from Anaconda Python using:

import sys
import ctypes as ct
lib = ct.CDLL('..\\..\\bin\\Debug\\x64\\solver_lib.dll')

Since then, I have been playing with a trial version of NAG to evaluate their solvers. My linker therefore has NLW6I293E_nag.lib in the Additional Dependencies list. Now when I try to run this python script again, on the “lib =” line, I get a popup which says:

python.exe - Entry Point Not Found
The procedure entry point for_stop_core_quiet could not be located in the dynamic link library C:\Program Files\NAG\NL29\nlw6i293el\bin\NLW6I293E_nag.dll.

Why is this happening? How do I fix it?

This seems to be a component of the Intel Fortran runtime. It looks like the objects of the two compilers got mixed up.

There aren’t two compilers. The reference to NAG above is to the NAG Fortran Library (going by product code=NL(library)W6I(64-bit Windows)29(Mark)), not the NAG Fortran Compiler. I suggest asking NAG Support for help.

Thanks, I’ll try. Although their support during a trial period is pretty dismal.