c++ - 编译/使用谷歌测试

标签 c++ visual-studio-2010 compiler-errors googletest

我正在尝试为我的项目编译和使用 Google 测试。 我已经使用成功创建了 .sln 和 .vcproj 文件 制作。 .sln 文件的编译也成功了。 但是,当我尝试按照指出的步骤操作时 在“nonsensical101”-s 中的回答如下: How to setup Google C++ Testing Framework (gtest) on Visual Studio 2005 我发现我的电脑上根本没有"gtestd.lib"。 为什么??? 这也是我在尝试编译示例时遇到的错误 程序。

错误:

Error 1 error LNK1104: cannot open file 'gtestd.lib' C:\Documents and Settings\User\my documents\visual studio 2010\Projects\String_GTest\String_GTest\LINK

附言。我正在使用 Visual Studio 10。

最佳答案

Google 的 C++ 测试框架有两个输出库:一个是 gtest.lib,另一个是 gtest_main.lib。根据 Nik Reiman 在 How to setup Google C++ Testing Framework (gtest) on Visual Studio 2005 上的回答,如果你没有这些,说明你没有编译成功...

关于c++ - 编译/使用谷歌测试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15808500/

相关文章:

c++ - 调试高内存使用率

c++ - 编译时体系结构x86_64错误的 undefined symbol

c - 在我的破坏函数中双重释放

c++ - 在 C++ 中相交 vector

c++ - 使用 win32 应用程序获取系统的文化信息

c# - 如何获取数据计数并使用 SQL 对其进行分类?

c - [错误]:expected '(' before 'hours'

c++ - c++中的加法ASCII

c++ - RAII、伯克利套接字和 STL 容器

winforms - Windows 窗体设计器中的居中对齐窗体