I have installed the new Phortran 7 as part of the PTP.
I want to develop my code using an OOP approach which requires me to have many modules I have found that the managed build system doesn't understand dependencies in my .f90 files.
I was working on this problem for a day now. I will explain my problem using a "fake" project
My project have 2 files
main.f90, module1.f90
main.f90 :
program main
use module1
implicit none
.....
code...
.....
end program main
module1.f90:
module module1
implicit none
contains
.....
code...
.....
end module module1
When I compile this code using the managed make and build command in the IDE I get the following error:
Fatal Error: Can't open module file 'module1.mod' for reading at (1): No such file or directory
make: *** [main.o] Error 1
It seems like that makefile goes in the alphabet order
taken from the subdir file:
F90_SRCS += \
../main.f90 \
../module1.f90
OBJS += \
./main.o \
./module1.o
I did checked this and if the I compile the project in the order of modul1.f90 before main.f90 everything works great.
But I was under the impression that the IDE can automatically take care of this problem, the USE keyword in Fortran needs to tell the IDE what order to link the files.
Can someone help me with this, I have read in other threads that the managed make should understand dependencies.
Thank you very much.