Page 14 of 14

Re: Instructions for Compiling FAST

Posted: Wed May 08, 2019 3:06 am
by Juan.Fernandez
Dear Jason,

I am using OpenFast v2.1.0. I am trying to recompile DISCON.f90, but I am encountering some problems. You can see how it compiles in Compile.jpg. I get this warning: "Illegal preprocessor directive", but it still compiles.
Compile.JPG (54.25 KiB) Viewed 1337 times

Then, I copy/paste the resulting DLL into the folder in which I am executing OpenFast. When I execute OpenFast (it worked perfectly fine before i tried to implement this change), I get this error "FAST_InitializeAll:SrvD_Init:BladedInterface_Init:The dynamic library
C:\Users\0272014\Desktop\PruebasFAST\VESTAS PRUEBA FAST\DISCON_x64.DLL could not be loaded. Check
that the file exists in the specified location and that it is compiled for 64-bit applications."

OpenFast.JPG (80.68 KiB) Viewed 1337 times

I am using GFortran for 64 bit applications. (MinGW-w64)

I have been trying to fix this problem, but I don't know if the error is due to the warning compiling the DLL, or it is due to my compiler being installed in a wrong way, or even another issue.

Thank you in advance.


Re: Instructions for Compiling FAST

Posted: Wed May 08, 2019 3:55 am
by Juan.Fernandez
Dear Jason,

I managed to solve the problem of the execution of FAST, it was just an stupid typo mistake, but I am still concerned about the warning during the compiling of DISCON.

Hope you can help me with that.


Re: Instructions for Compiling FAST

Posted: Wed May 08, 2019 9:13 pm
by Bonnie.Jonkman

You need to tell the compiler to preprocess the source file. With gfortran, you add the "-cpp" option to the build command that you used (on Intel Fortran, you use '-fpp'):

Code: Select all

gfortran -cpp -c -fPIC DISCONChanges.f90

In these particular source files, though, the preprocessor directives are used to skip some code that causes errors when building on Linux or Mac OS. So, I'm pretty sure that the DLLs you created are exactly the same as if you had used the "-cpp" option.

Re: Instructions for Compiling FAST

Posted: Thu May 09, 2019 2:00 am
by Juan.Fernandez
Hello Bonnie,

Thank you for your quick response.
Adding -cpp removed the warning in the code.
Also, as you predicted, the behaviour of both DLLs (with warning and without warning) is exactly the same when executing OpenFast.

I really appreciate your help.
Best regards,


Re: Instructions for Compiling FAST

Posted: Tue Aug 13, 2019 10:37 am
by George.Elderfield
Hi Bonnie,

I am trying to compile openFAST on windows using the visual studio method from here ... ... ndows.html

When doing the Build>Build Solution step I got errors as suggested in the document so I closed and tried again as per the instructions. I now get the 5 errors shown below every time I close and Build solution again. How can I overcome this problem?

Many Thanks

Openfast error list.JPG
Openfast error list.JPG (110.63 KiB) Viewed 629 times

Re: Instructions for Compiling FAST

Posted: Wed Aug 14, 2019 8:07 am
by Jason.Jonkman
George.Elderfield's question has been answered on OpenFAST issues (, and so, will not be answered here.