Use Google Test from Qt in Windows

后端 未结 3 1363
终归单人心
终归单人心 2021-02-08 15:45

I have a simple test file, TestMe.cpp:

#include 

TEST(MyTest, SomeTest) {
  EXPECT_EQ(1, 1);
}

int main(int argc, char **argv) {
  ::testi         


        
3条回答
  •  北荒
    北荒 (楼主)
    2021-02-08 16:15

    I think you are ok for your qmake file. But Why is INCLUDEPATH absolute and LIBS relative. I would try setting LIBS absolute also.

    From here http://doc.trolltech.com/4.6/qmake-variable-reference.html#includepath

    But what the main problem is (I think) you need to put forward slashes in INCLUDEPATH. In the docs it is like this.

    INCLUDEPATH += C:/gtest-1.5.0/gtest-1.5.0/include
    

提交回复
热议问题