简体   繁体   English

未解析的外部符号(LNK2001)

[英]Unresolved external symbol (LNK2001)

I have two projects: Project A and project B. 我有两个项目:项目A和项目B。

Project B references Project A. 项目B引用项目A。

When I compile I get the following errors: 编译时出现以下错误:

LINK : warning LNK4044: unrecognized option '/MaxILKSize:2146435072'; ignored
1>Testing.obj : error LNK2001: unresolved external symbol _IID_ITestIntOne
1>Testing.obj : error LNK2001: unresolved external symbol _IID_ITestIntTwo
1>Testing.obj : error LNK2001: unresolved external symbol _CLSID_WTest
1>    Wait PDB close: Total time = 0.000s
1>  Final: Total time = 1.547s
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

However project B is not using the SecurityCenterIntegration class at all, so I'm not sure why there are problems while linking to it. 但是,项目B根本没有使用SecurityCenterIntegration类,因此我不确定为什么链接到它时会出现问题。

You are missing Project A's libs or sources. 您缺少Project A的库或源。 Make sure you included all dependencies in the project settings. 确保在项目设置中包括所有依赖项。 Go to Properties > Linker > General and check Additional Library Directories are correct. 转到“属性”>“链接器”>“常规”,然后检查“其他库目录”是否正确。 Also add any additional libs and objs into Properties > Linker > Input > Additional Dependencies. 还将所有其他库和obj添加到“属性”>“链接器”>“输入”>“其他依赖项”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM