Fortran and separate module files
I've been messing around with Fortran and came up with a neat little physics program. There are two cars on the road and the program finds if they will collide given the speed and acceleration and distance between the two. But I have quite a few subroutines and would like to not just put them into a module but have them in separate files. But it doesnt seem to work. I'm using the intel fortran compiler(ver 8.1) and it gives me an error ": undefined reference to `MAIN__' " So whats going on here? I tested this out in windows using FTN95 and Plato and it works.
|
Why don't you try g77? ;)
lasindi |
Because fortran 77 is too old haha as ironic as that is.
|
Ok after some playing around I used ifort -c ###.f90 to make an object file out of the individual modules. But now how do I make the main program with these object files?
|
hi there,
a bit old, but looks still not answered... you can give the parameter "-o " it means output.. Code:
ifort -o main_program file1.o file2.o file3.o file4..... slackie1000 |
All times are GMT -5. The time now is 04:49 AM. |