1

I downloaded a Fortran simulation from github and wanted to run the main_prog.f90 on CodeBlocks. I'm not sure what the This project uses the CMake build system means in the readme file, so if I try to compile, I get an error:

Fatal Error: Can't open module file 'asteroid_module.mod' for reading at (1): No such file or directory

Does this mean that CodeBlocks can't locate the module files? If so how do I fix it and does it involve using CMake in CodeBlocks? I looked at relevant posts like this older question but it wasn't helpful.

Edit: I had to add MinGW to the environment variables (see eg. this post, and note for Win10 you go to Control Panel > System > Advanced System Settings > System properties > Advanced > Environment variables). It seems to work now.

Medulla Oblongata
  • 3,771
  • 8
  • 36
  • 75
  • Hello, Cmake is a building tool. You may need to build the root CMakeLists.txt at the root of the project before compiling it. Did you ran the Cmake command lines such as indicated in the section "Building and Running" in the ReadMe ? I think this will generate your missing .mod – Greg Dec 15 '22 at 13:29
  • Please do not post error messages as pictures. It is extremely important that they can be searched by people with a similar problem. Always post your output as text. Also, whenever you have an error message, like the missing .mod file, you should also show the command that you ran when you got the error. – Vladimir F Героям слава Dec 17 '22 at 11:56

0 Answers0