Error with toolbox, can not find toolbox.mod

Forums Questions on specific programs Error with toolbox, can not find toolbox.mod

This topic contains 1 reply, has 2 voices, and was last updated by Fabian Kindermann July 6, 2020 at 11:00 am.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1856

    Simon Paul
    User

    Hi, I’m using Win 7 system and toolbox version 1.3,
    when I try to run prog01_17 and prog01_18, the following error occurs, the other programs in prog01 are working fine.

    gfortran -Wall -c “prog01_17.f90” (in directory: D:\Fortran Learning\complete\prog01\prog01_17)
    prog01_17.f90:17:8:
    17 | use toolbox
    | 1
    Fatal Error: Cannot open module file ‘toolbox.mod’ for reading at (1): No such file or directory
    compilation terminated.
    Compilation failed.

    Can anyone help with this?

    #1860

    Fabian Kindermann
    Moderator

    Hi Simon,

    it seems that you compiler statements in geany are messed up. When you want to call a program that includes toolbox routines, the compiler statement in geany should read like

    gfortran -O3 -Werror -Wno-unused -fimplicit-none -Wall -fcheck=bound,do -ffpe-trap=invalid,zero,overflow -I"C:\cygwin\include" -J"./Build" -c "%f" -o "Build/%e.o"
    

    If you are manually compiling a program from the command line, the minimum specification you have to use is

    gfortran -I"C:\cygwin\include" -c "prog01_17.f90"
    

    Not that you also have to provide the location o toolbox.o upon linking and builing the file. So you need

    gfortran "C:\cygwin\include\toolbox.o" "prog01_17.o" -o prog
    

    Does this help? Let me know if there are any more issues.

    Best,
    Fabian

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.