Skip to content
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

Flang Linker issues on Windows : unrecognized option '/lflang'; ignored #162

Open
harishch4 opened this issue Jul 14, 2023 · 1 comment
Open

Comments

@harishch4
Copy link
Contributor

When trying to compile a simple hello world fortran program causes below error:

warning: overriding the module target triple with x86_64-pc-windows-msvc19.29.30151 [-Woverride-module]
1 warning generated.
Microsoft (R) Incremental Linker Version 14.29.30151.0
Copyright (C) Microsoft Corporation. All rights reserved.

LINK : warning LNK4044: unrecognized option '/lflang'; ignored
LINK : warning LNK4044: unrecognized option '/lflangrti'; ignored
LINK : warning LNK4044: unrecognized option '/lpgmath'; ignored
LINK : warning LNK4044: unrecognized option '/lpthread'; ignored
LINK : warning LNK4044: unrecognized option '/lrt'; ignored
test-ae5ad6.o : error LNK2019: unresolved external symbol fort_init referenced in function MAIN_
test-ae5ad6.o : error LNK2019: unresolved external symbol f90io_src_info03a referenced in function MAIN_
test-ae5ad6.o : error LNK2019: unresolved external symbol f90io_print_init referenced in function MAIN_
test-ae5ad6.o : error LNK2019: unresolved external symbol f90io_sc_ch_ldw referenced in function MAIN_
test-ae5ad6.o : error LNK2019: unresolved external symbol f90io_ldw_end referenced in function MAIN_
LINK : error LNK2001: unresolved external symbol mainCRTStartup
a.exe : fatal error LNK1120: 6 unresolved externals
flang: error: linker command failed with exit code 1120 (use -v to see invocation)

Branch : release_15x.
linker command :

"C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Tools\\MSVC\\14.29.30133\\bin\\Hostx64\\x64\\link.exe" -out:a.exe "-libpath:C:\\Users\\test\\flang-compiler\\classic-flang-llvm-project\\build\\lib" -lflang -lflangrti -lpgmath -lpthread -lrt /subsystem:console -nologo "C:\\Users\\AMD\\AppData\\Local\\Temp\\test-7b4961.o"

Does classical-flang have full support on windows?

@bryanpkc
Copy link
Collaborator

@kaadam FYI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants