使用cygwin64在Eclipse和Windows中配置Gmock ENV

时间:2018-10-18 03:35:24

标签: installation googletest gmock

我已在Windows7中使用ecyse cygwin64成功安装了Gmock,希望对参考有用。

第一步:下载google / googletest

   https://github.com/google/googletest/tree/release-1.8.0

第2步:构建googleMock项目

   1.Open Cygwin (or cmd line in windows if it works).
   2.Change the current working directory to the unzipped GoogleTest make directory: 
     cd  <<yourpath>>/googletest-release-1.8.0/googlemock/make
   3.Build the project: 
     > make
   4.Create an archived library out of the gtest-all.o file: 
     ar -rv libgmock.a gtest-all.o gmock-all.o

enter image description here

第3步:设置运行环境
         <> googleMock 包含文件 lib 使其黯然失色

Eclipes:项目单元测试->属性-> C / C ++构建->设置->

包含文件:

enter image description here

库:

enter image description here

参考

  1. C++ unit test start guide how to set up Google Test (gtest) in Eclipse?
  2. Using googletest in eclipse: how?

0 个答案:

没有答案