铿锵错误: linker command failed with exit code 1104

标签 c windows cmake clang

嗨,我对 Windows 命令提示符相当陌生(只使用过基于 Linux 的操作系统)

我正在尝试根据此 tutorial 安装适用于 Windows 的 OpenBLAS .

当我尝试运行步骤 6 时

cmake .. -G "Ninja" -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER=clang-cl -DCMAKE_Fortran_COMPILER=flang -DBUILD_WITHOUT_LAPACK=no -DNOFORTRAN=0 -DDYNAMIC_ARCH=ON -DCMAKE_BUILD_TYPE=Release

我收到以下错误

Compiling the C compiler identification source file "CMakeCCompilerId.c" failed. Compiler: C:/ProgramData/Anaconda3/Library/bin/clang-cl.exe Build flags: /DWIN32;/D_WINDOWS;/W3 Id flags:

The output was: 1104 LINK : fatal error LNK1104: ファイル 'libcmt.lib' を開くことができません。 clang-cl.exe: error: linker command failed with exit code 1104 (use -v to see invocation)

Run Build Command:"C:/ProgramData/Anaconda3/Library/bin/ninja.exe" "cmTC_e55c4" [1/2] Building C object CMakeFiles\cmTC_e55c4.dir\testCCompiler.c.obj

[2/2] Linking C executable cmTC_e55c4.exe

FAILED: cmTC_e55c4.exe

cmd.exe /C "cd . && C:\ProgramData\Anaconda3\Library\bin\cmake.exe -E vs_link_exe --intdir=CMakeFiles\cmTC_e55c4.dir --manifests -- C:\PROGRA~2\MICROS~2\2017\COMMUN~1\VC\Tools\MSVC\1415~1.267\bin\Hostx64\x64\link.exe /nologo CMakeFiles\cmTC_e55c4.dir\testCCompiler.c.obj /out:cmTC_e55c4.exe /implib:cmTC_e55c4.lib /pdb:cmTC_e55c4.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."

RC Pass 1: command "rc /foCMakeFiles\cmTC_e55c4.dir/manifest.res CMakeFiles\cmTC_e55c4.dir/manifest.rc" failed (exit code 0) with the following output: 隰悶・・ョ螢ケ・・ケァ蠕娯螺郢晁シ斐<郢ァ・、郢晢スォ邵コ迹夲スヲ荵昶命邵コ荵晢ス顔クコ・セ邵コ蟶呻ス鍋クイ繝サ ninja: build stopped: subcommand failed.

随机,而且,我不知道为什么它最后输出汉字......(我的系统语言设置为日语而不是中文)

最佳答案

抱歉回答晚了 - 您还应该添加 -DCMAKE_RC_COMPILER=llvm-rc (不记得正确的名称)

关于铿锵错误: linker command failed with exit code 1104,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52195803/

相关文章:

c++ - 绘画后winapi窗口不刷新

c - 如何在 C 中使用 GMP 库分配浮点值?

c# - WinRT gridview 添加磁贴

python - 更改python环境 'cmd'无法识别

linker - CMake 链接失败

c - 错误 C2660 : function does not take X arguments

java - 如何方便终端用户启动Java GUI程序

cmake - 使用指定的HTML输出从CMake项目生成Web程序集

c++ - 将 Makefile 转换为 CMAKEList(编译成功但程序行为不同)

c - SHA1 消息摘要到纯文本