You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered multiple compilation and linker errors when building the NASTRAN-95 project with Intel oneAPI and the Microsoft Visual Studio toolchain. These include syntax errors with directives, multiple definitions of MAIN__, and unresolved external symbols.
Errors
Compilation Warnings:
The following warnings appear for Fortran files partn3.f, rcard.f, rcard2.f indicating syntax errors with directives:
C:\dev\NASTRAN-95\mis\partn3.f(2): remark #5082: Directive ignored - Syntax error, found '=' when expecting one of: :
CDIR$ INTEGER=64
Similar errors are repeated across the specified files.
Linker Errors:
Linking the Fortran executable results in errors related to multiple definitions and unresolved external symbols:
chkfil.f.obj : error LNK2005: MAIN__ already defined in nastrn.f.obj
shtrmd.f.obj : error LNK2019: unresolved external symbol Q8SHPD referenced in function SHTRMD
C:\dev\NASTRAN-95\bin\nastran.exe : fatal error LNK1120: 3 unresolved externals
Unrecognized Directives:
Additional warnings about unrecognized directives in dsupkc.f:
```
The use of 64-bit integers can be specified by -i64 in the cft77 command, INTEGER=64 in the CFT77 control statement, or CDIR$ INTEGER=64 in your program.
```
so I wrapped the lines including the Cray compiler directive (`CDIR$`) like:
```fortran
!DEC$ IF DEFINED(CRAY_COMPILER)
CDIR$ <...>
!DEC$ ENDIF
```
and instructed `ifort.exe` with `/integer-size=64`
this partly solves issue #1 [here](#1)
Description
I encountered multiple compilation and linker errors when building the NASTRAN-95 project with Intel oneAPI and the Microsoft Visual Studio toolchain. These include syntax errors with directives, multiple definitions of
MAIN__
, and unresolved external symbols.Errors
Compilation Warnings:
The following warnings appear for Fortran files
partn3.f
,rcard.f
,rcard2.f
indicating syntax errors with directives:Similar errors are repeated across the specified files.
Linker Errors:
Linking the Fortran executable results in errors related to multiple definitions and unresolved external symbols:
Unrecognized Directives:
Additional warnings about unrecognized directives in
dsupkc.f
:Build Environment
Steps to Reproduce
build.bat
script.Expected Behavior
The project should compile without errors and link all symbols correctly.
Actual Behavior
Compilation stops with syntax errors on Fortran directives, and the linker fails with multiple definitions and unresolved symbols errors.
Possible Solutions
MAIN__
across different files.This issue needs attention to correct the errors for a successful build. Any help or insights are welcome!
The text was updated successfully, but these errors were encountered: