I am building a Fortran 90 library and its extension. .mod files get
generated inside the build/temp.linux-x86_64-2.7/ directory, and stay
there; so when building the extension, the compiler complains that it
cannot find the modules
This is because the include paths do not have the temp directory. I can
work this around by adding that to the include paths for the extension, but
this is not a clean solution.
What is the best solution to this?

I also want to be able to use the modules later, because I will distribute
the library. It is some other issue whether the modules should be
distributed with the library under /usr/lib or /usr/include, refer to
this<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49138>bug.

Also one can refer to
this<https://gcc.gnu.org/ml/fortran/2011-06/msg00117.html>thread. This
is what convinced me to distribute the modules, rather than
putting module definitions into header files, which the user can include in
their code to recreate the modules. Yet another way is to use submodules,
but that feature is not available in Fortran 90.
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to