I am using CFFI to call a C function with OpenMP from Python. My code works on one of my computers, but not the other with a very similar setup.
import os
from cffi import FFI
# test
os.system("gcc -fopenmp -c test.c -o test.o")
os.system("gcc -o test.exe test.o -fopenmp")
os.system("test.exe")
# gateway
ffi = FFI()
os.system("gcc -o test.so test.c -shared -fopenmp")
ffi.cdef(r''' int main(); ''')
lib = ffi.dlopen(r'''test.so''')
lib.main()
The error is
OSError: cannot load library test.so: error 0x45a
I am using Python 3.5 (the latest Anaconda distribution) and TDM-GCC 5.1.0. The test runs on both computers. What can explain the difference behavior?
LD_DEBUG=all.