使用VC ++ 2012进行CPP单元测试 - LNK2001未解析的外部符号 [英] CPP unit test using VC++ 2012 - LNK2001 unresolved external symbol

查看:189
本文介绍了使用VC ++ 2012进行CPP单元测试 - LNK2001未解析的外部符号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在尝试为VC ++应用程序(.exe)创建CPP单元测试,使用NATIVE C ++(在UT项目中 - >添加所有依赖项 (参考/包含)根据MSDN中提到的程序,
但无法链接UUT CPP的目标文件。)

We are trying to create CPP unit test for VC++ application (.exe), with NATIVE C++ (in UT project --> added all the dependencies  (reference/includes) as per procedure mentioned in MSDN, but could not able to LINK the UUT CPP's object file).

For相应的UUT cpp文件,为类创建了一个对象并编译了UT项目,我们得到了
ERROR LNK2001: 未解析的外部符号类< constructor>。

For the respective UUT cpp file, created an object for the class and compiled the UT project, we got ERROR LNK2001: unresolved external symbol class <constructor>.

请帮我解决UT问题。

推荐答案

请注意,有一个专门用于VS单元测试的论坛问题:



Visual Studio开发> Visual Studio单元测试

https: //social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=vsunittest



- Wayne

Note that there is a forum specifically for VS Unit Testing issues:

Visual Studio Development > Visual Studio Unit Testing
https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=vsunittest

- Wayne


这篇关于使用VC ++ 2012进行CPP单元测试 - LNK2001未解析的外部符号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆