Настройте Gmock ENV в Eclipse & Windows с помощью cygwin64 - PullRequest
0 голосов
/ 18 октября 2018

Я успешно установил Gmock в Windows7 с помощью eclipse cygwin64, надеюсь, он будет полезен для ссылок.

Шаг 1: Загрузите google / googletest

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

Step2: Создание проекта 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 inludeфайлы и lib в eclipes

Eclipes : Project unit_test-> properties -> C / C ++ Build -> Setting ->

Входящие файлы:

enter image description here

Lib:

enter image description here

Ссылка

  1. Руководство по началу работы с модульным тестом C ++, как настроить Google Test (gtest) в Eclipse?
  2. Использование googletest в затмении: как?
...