Reputation: 273
It's the first time I make mock object in QT. I'm trying using Gmock, but I don't know how to using it. Now, I create project TestGmock (QT Application) in QT, and I copy include folder in gmock-1.7.0 ( download it from https://code.google.com/) to TestGmock project directory ( and the same with gtest ). In class main :
#include <QCoreApplication>
#include "gmock/gmock.h"
#include "gtest/gtest.h"
int main(int argc, char *argv[])
{
testing::InitGoogleMock (&argc, argv);
return RUN_ALL_TESTS();
}
But error :
Please help me using gmock and gtest in QT.
Upvotes: 0
Views: 2597
Reputation: 1965
This error is caused the fact, that Qt Creator couldn't find Gmock library. There is no need to put it in your project (or Qt installation) directory, but you should add INCLUDEPATH
and LIBS
options in .pro
file. Look at Adding external library into Qt Creator project.
Upvotes: 0