Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt Creator, MSVC compiler and INCLUDEPATH [fixed]

Qt Creator, MSVC compiler and INCLUDEPATH [fixed]

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 2.2k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    milgner
    wrote on last edited by
    #1

    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
    }

    DEFINES += "_VARIADIC_MAX=10"
    INCLUDEPATH += $$PWD/../gtest-1.7.0/include

    SOURCES += main.cpp
    @

    When building via command line via

    @
    qmake CONFIG+="debug" CoreLibTestsPro.pro
    nmake
    @

    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?

    1 Reply Last reply
    0
    • M Offline
      M Offline
      milgner
      wrote on last edited by
      #2

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

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved