Qt Creator, MSVC compiler and INCLUDEPATH [fixed]

  • I have a very simple project in which I try to use Google Test from within Qt Creator using the MSVC compiler.

    The project file looks like this
    QT += core
    QT -= gui

    TARGET = CoreLibTests
    CONFIG += console
    CONFIG -= app_bundle

    TEMPLATE = app

    debug {
    win32:LIBS += $$PWD/../gtest-1.7.0/msvc/x64/Debug/gtestd.lib

    INCLUDEPATH += $$PWD/../gtest-1.7.0/include

    SOURCES += main.cpp

    When building via command line via

    qmake CONFIG+="debug" CoreLibTestsPro.pro

    It builds as expected. But from within Qt Creator it complains "Cannot open include file: 'gtest/gtest.h'".
    I tried leaving out the "$$PWD" reference but that didn't help.

    Does anyone have a tip, how to set up INCLUDEPATH or configure Qt Creator?

  • It works when disabling "Shadow Build" in the project settings.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.