Bear with me for a bit and lets try to get you in a more comfortable path:
-
Please, do yourself a favor and do not work in this directory
C:\Program Files (x86)
, for you as an user it should be like Mordor. Also, white spaces in the path usually lead to issues. So refrain from using this folder for your own development work. -
Let’s navigate the
fpm
way, I promise, it will ease things from here onwards… OpenTerminal
, it should open in a PowerShell terminal, from here install fpm
winget install FortranLang.fpm
- I saw you have a D drive, so let’s work in a safer space, from your PowerShell terminal (assuming that it is currently pointing somewhere in your C drive) :
D:
mkdir fortran_lang
git clone https://github.com/fortran-lang/stdlib.git
cd stdlib
python config/fypp_deployment.py
This will download stdlib and pre-preprocess all the fypp files such that you can build stdlib with fpm, and if you later want to change the defaults it will be possible.
- Create your own project to play around, one level up:
cd ..
fpm new my_project
cd my_project
In the fpm.toml, add stdlib as a dependency using your locally downloaded version fpm local dependencies:
[dependencies]
stdlib = { path = "../stdlib" }
You can copy-paste example programs in the app
folder of your local project and do fpm run
to play around.
You might want to read this thread Fortran stdlib: sufficient for scientific programming? - #22 by hkvzjal