ford icon indicating copy to clipboard operation
ford copied to clipboard

Question related to include files .inc

Open Jonas231 opened this issue 3 years ago • 2 comments

Hello, thank you for providing this package. I tried to use it to document some legacy fortran code. For this I wrote a project-file.md: https://github.com/Jonas231/Koko/blob/master/Docs/FORD/project-file.md A file .f within src_dir tries to INCLUDE "datlen.inc" which is, however, contained in 'Src/include' folder. The message says:

File "/home/jonas/miniconda3/lib/python3.9/site-packages/ford/reader.py", line 410, in include raise FileNotFoundError(msg) FileNotFoundError: Can not find include file "datlen.inc".

The .inc file is there: https://github.com/Jonas231/Koko/blob/master/Src/include/datlen.inc

It is included within this .f-file: https://github.com/Jonas231/Koko/blob/master/Src/raytrace/insider.f in Line 58.

Could you please give me a hint on how to solve this issue?

Best regards, Jonas

Jonas231 avatar Jan 28 '22 20:01 Jonas231

Let me explain some more: My issue is related to #134 and #146. I cannot copy all the files.inc into the same folder as the .f which is including the .inc files.

I have a file structure like this:

Docs

FORD

project-file.md

Src

raytrace

insider.f

plotcad

plotcad1.f

include

datlen.inc

Both "insider.f" and "plotcad1.f" INCLUDE 'datlen.inc'. The project-file.md handles this by:

src_dir: ../../Src/raytrace ../../Src/plotcad include ../../Src/include However, the file "datlen.inc" cannot be found.

Jonas231 avatar Jan 29 '22 11:01 Jonas231

Hi @Jonas231, it looks like you're missing a colon after include:

src_dir: ../../Src/raytrace
         ../../Src/plotcad
include: ../../Src/include

It looks like your project might also hit some other issues:

  • there's some INCLUDE 'LOADSHEET.INC' lines (and possibly other include files) which fail because the file is lowercase. I'm not sure what the standard behaviour is here
  • possibly there's a FORD bug when specifying attributes over multiple lines. I'll investigate further

ZedThree avatar Jan 31 '22 10:01 ZedThree