-
Notifications
You must be signed in to change notification settings - Fork 458
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Facing Issue in compiling with VS2022 #2305
Comments
I would like to give an update. the above issue has been resolved by adding system variable for git. But after correcting I am getting two error while linking as below: FAST_Prog.f90 |
I would like to provide an update on the error mentioned above. When I use the /FORCE:MULTIPLE option under Linker-Command Line in [FAST (IFORT)], the executable is generated without errors. I am using SACS software (by Bentley) to simulate the substructure jacket and tower in SACS, along with the wind turbine and its loading from OpenFAST. Bentley provides a dedicated SACS_FAST interface module for this analysis. This module requires replacing the Subdyn.f90 file with their version. The Subdyn.f90 module provided by SACS is as follows: Module SubDyn USE SubDyn_Types IMPLICIT NONE PRIVATE !............................ TYPE(ProgDesc), PARAMETER :: SD_ProgDesc = ProgDesc( 'SubDyn', 'v1.03.00', '11-Apr-2016' ) CONTAINS The above code is the exact SubDyn module provided by Bentley. When using this module, I encountered an Explicit Interface Error in FAST_Lin.f90. It appears that the subroutines SD_GetOP, SD_JacobianPContState, and SD_JacobianPInput are being called in FAST_Lin.f90. Therefore, I added these subroutines from the original Subdyn.f90 to the Bentley-provided module. Additionally, the module requires a static library file to be linked as an additional dependency to the FAST project. I have added the static library file in FASTlib (IFORT) as follows: With this setup, I can successfully compile FASTlib (IFORT). However, when attempting to compile FAST (IFORT), I encounter the following errors. The output log from the FAST (IFORT) compilation is provided below: Build started at 16:05... Build log written to "file://D:/OpenFAST_Final/vs-build/FAST/x64/Debug/BuildLog.htm" Could you please provide a solution for this issue? |
@bjonkman Thanks for your response. As per my understanding, /FORCE:MULTIPLE command Used has nothing to do with the external library that I am trying to link with. Actually, before replacing the Subdyn module and linking the external static library, I tried to compile the OpenFAST as it is. So, without changing anything I tried to compile it and I got LNK2005 error. Though it was in debug mode; I have changed it to Release mode and I got the same error (without using /FORCE:MULTIPLE COMMAND). Here I have attached the build log for your reference. Awaiting your feedback. |
Dear @bjonkman, thanks for response. As you suggested, I started with unchanged OpenFAST code and clean and build the solution. I got the same LNK2005 error. |
Some things to try:
Just FYI: I am using the 2024.1 version of the IFORT compiler with VS 2022 without issue. I installed the oneAPI base toolkit, HPC toolkit and 32-bit base toolkit. |
Dear @bjonkman, downgrading Intel oneAPI Base Toolkit to 2024.1, I am able to compile it successfully. Thank you for your valuable support in resolving the issue. I would appreciate your continued assistance on the issue which I explained in my third comment of this thread. to summarize the issue, I need to replace SubDyn.f90 and link a static library as an additional dependency to my FAST project in Visual Studio. |
Since I don't really know what SubDyn changes you are implementing, I don't know how much help I will be. If you are still having issues with the build, I would recommend:
|
@bjonkman , thank you for your input. I'm working on gathering the requested information from Bentley. In the meantime, I've attempted to use FASTv8 with the SubDyn file provided by Bentley. In this case, I have not made any modification to the SubDyn module provided by Bentley. Unfortunately, I'm encountering linking errors. My solution explorer looks like below: To provide more context, I've attached screenshots of my FAST project configuration, compilation output, and the SubDyn module. I've added the necessary directories for *mod files and the static library to the linker input. I'm hoping you can provide guidance on the potential causes of the linking error and possible solutions. Please note that my programming experience is limited, and I have a civil engineering background. Thank you for your assistance |
When I am compiling in Visual Studio 2022 (in Windows 11) I am getting error as per attachment. I have not made any changes to source code. I have downloaded the files through a git clone as per https://openfast.readthedocs.io/en/main/source/install/index.html#get-the-code, section 3.2.2. I have given the snap of the solution explorer and FAST Property Page. Kindly help me resolve the issue.
I would like to mention here that I first tried to compile in 'Building OpenFAST on Windows with CMake and Cygwin 64-bit' option. It was working fine until I didn't change anything in the source code. But when I replace the 'SubDyn.f90' file with the file provided by Bentley SACS for their integration with OpenFAST, I was getting error. this process required to link a static library file as additional dependency which I was not able to do in CMake environment. It would be appreciated, if anybody can reflect this issue as well. Thanks & Regards.
snap from VS2022.pdf
The text was updated successfully, but these errors were encountered: