probably I have taken a long route, but for some reason, I have to call a python routine from fortran. So, I have use cython
.
Cython has generated the C code.
As per cython document, I tried to compile the code. The shared lib (.so) file is generated without problem, but I cant compile the C file to executable.
I tried compiling it using info given here. I have also checked the accepted answer here, but in my linux system, the libpython does not exist(may be somwhere else to look at?)
gcc -c -I/usr/include/python3.4/ parse.c
gcc -I/usr/include/python3.4m/ -L/usr/lib64/python3.4/site-packages/ parse.c -lpython
/usr/bin/ld: cannot find -lpython
collect2: error: ld returned 1 exit status
So, is there any way to compile the C file generated by python? Or, alternatively, can I use the generated so file(I guess I need the lpython any way).
So, at present, the question is:
How to compile C code generated by cython?
where I can found the libpython.so if fedora-linux?
The pyx (or the python code is:) https://drive.google.com/file/d/0B02WblgE6NEvenNYT1RoVmMyM3M/view?usp=sharing (Somehow the code formatting here did not worked, so, uploaded it in drive)