LINK : fatal error LNK1104: cannot open file "nafxcwd.lib"

本文介绍了解决Microsoft Visual C++ 6.0在尝试静态链接MFC库时遇到的问题的方法。具体步骤包括:打开项目设置,选择所有配置,切换到通用选项卡,在Microsoft Foundation Classes选项中选择使用MFC在共享DLL中。

编译时出现此问题,说明将项目设置设为了“在静态库中使用MFC”。Microsoft Visual C++ 6.0标准版不支持静态链接到MFC库。

解决方法为使用动态链接到MFC库。具体操作为:

1.>打开您的 "Project"。
2.>从 "Project" 菜单中单击 "Settings"。
3.>在 "Setting for", 选择 "All configurations"。
4.>单击 "General 选项卡。如果它是不可见的使用选项卡滚动按钮向左滚动。
5.>在 "Microsoft foundation classes" 组合框选择 "Use MFC in a Shared DLL"。
6.>单击 "Ok" 以保存所做的更改。

CMake Error at D:/ProgramFiles/CMake/share/cmake-4.1/Modules/CMakeTestFortranCompiler.cmake:59 (message): The Fortran compiler "D:/ProgramFiles/Intel/oneAPI/compiler/2025.2/bin/ifx.exe" is not able to compile a simple test program. It fails with the following output: Change Dir: 'D:/ProgramFiles/Magma/magma-2_9_0/build/CMakeFiles/CMakeScratch/TryCompile-egurh1' Run Build Command(s): "C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/devenv.com" CMAKE_TRY_COMPILE.sln /build Debug /project cmTC_b5289 Microsoft Visual Studio 2022 版本 17.14.10. 版权所有(C) Microsoft Corp.。保留所有权利。 生成开始于 15:25... 1>------ 已启动生成: 项目: cmTC_b5289, 配置: Debug x64 ------ Compiling with Intel? Fortran Compiler 2025.2.0 [Intel(R) 64]... testFortranCompiler.f Intel(R) Fortran Compiler for applications running on Intel(R) 64, Version 2025.2.0 Build 20250605 Copyright (C) 1985-2025 Intel Corporation. All rights reserved. Compiling manifest to resources... Microsoft (R) Windows (R) Resource Compiler Version 10.0.10011.16384 Copyright (C) Microsoft Corporation. All rights reserved. Linking... Microsoft (R) Incremental Linker Version 14.44.35213.0 Copyright (C) Microsoft Corporation. All rights reserved. /OUT:D:/ProgramFiles/Magma/magma-2_9_0/build/CMakeFiles/CMakeScratch/TryCompile-egurh1/Debug/cmTC_b5289.exe /VERSION:0.0 /MANIFEST /MANIFESTFILE:cmTC_b5289.dir/Debug/cmTC_b5289.exe.intermediate.manifest "/MANIFESTUAC:level='asInvoker' uiAccess='false'" /SUBSYSTEM:CONSOLE /IMPLIB:D:/ProgramFiles/Magma/magma-2_9_0/build/CMakeFiles/CMakeScratch/TryCompile-egurh1/Debug/cmTC_b5289.lib -LIBPATH:C:/Program Files (x86)/Windows Kits/10/Lib/10.0.26100.0/um/x64 cmTC_b5289.dir/Debug/testFortranCompiler.obj cmTC_b5289.dir/Debug/cmTC_b5289.exe.embed.manifest.res LINK : fatal error LNK1181: 无法打开输入文件Files.obj” Build log wr
07-31
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值