My boss just asked me to integrate his bosses old Fortran code into a project (Java) I'm working on. The code was written in the 90s, so I imagine it'll still compile, so rather than re-write it, I'm hoping I can just call the functions from a .dll. I'm already calling some C .dlls, so I think I've got that part covered.
I've been doing some reading, and most of the articles talk about integrating the Intel Visual Fortran Compiler into Microsoft Visual Studio. We've got a university site license for Visual Studio, but it looks like the Intel Visual Fortran Compiler is in around the $700 range. I don't think my boss will go for that, so I'm looking for another option. I know Microsoft makes a lot of products freely available to students via Project Dreamspark, but I didn't see anything Fortran related.
I'm looking at some cygwin based options right now (g95, I think), but I'm looking for other ideas/options. Any ideas?
I've used the gfortran (g95) compiler with the -shared flag to create DLLs. first compile the .for/.f90 files with:
gfortran -c myfile1.f90
gfortran -c myfile2.f90
then:
gfortran -shared -o mydll.dll myfile1.o myfile2.o
MinGW will let you create a DLL that will work with your MS stuff.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With