I have uploaded with this message a zipped folder. The folder contains a sample problem in Fortran 90, which is used to create a shared dynamic library. The shared library is then used in an example with Python. This example is exactly what I do for a bigger project, where Fortran 90 and C codes are converted to shared libraries.
The folder consists of
README.txt --> read this first
Makfile --> general makefile for a shared library
main.f90 --> the source code
runme.py --> a Python 3 script file to show the use of the shared library
html/ --> open the document with a browser, it has notes I have written long ago
I really think you should be able to go through this easily. If you need some help or discuss anything, just send a message.
Below I have copied the README.txt for you.
What is it?
-----------
A sample is provided which consists of a Fortran 90 source code; the source
code consists of 3 subroutines, and it is used to create a dynamic shared
library which is shown to be executed from Python, as one example. There is
some specific syntax which enables Python to load and run a shared library.
What are the steps to create the shared dynamic library?
Thanks for your considerations, but I'm truly sorry for misunderstanding. I use STAR CCM+ in windows (particularity 64 bit version) and therefor i need how to compile user codes and import it into STAR CCM+. our user codes have been written in FORTRAN code, but I think that FORTRAN code is not compatible for windows.
Unfortunately, I don't think to be able to answer this question as I only use Linux for my work. I suspect, thought, that it is possible and, in fact, I have run large Fortran codes in Windows. I remember cygwin was use. Try to have a look at the website:
Dear Sajad A. Moshizi, I am facing the same problem with you, I would like to use c to compile the user code, how did you carry out? Could you please give me some help? Thank you!