I'm relatively new to fortran90 that I need for a project.
I have three scripts, 2 modules and the main program with the following structure:
script 1:
program main
use module1
implicit none
..
call sub_from_mod1
end program main
script 2:
module module_2
implicit none
contains
..
end module module_2
script 3:
module module_1
use module_2
implicit none
contains
...
subroutine sub_from_mod1
...
end module module_1
When compiling in CodeBlocks the whole project, I get an error:
undefined reference to sub_from_mod1_
Does anyone know what is the case?