Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Qt5 VisualStudio Add-in 1.2.4 not populating the QTDIR macro
Qt 6.11 is out! See what's new in the release blog

Qt5 VisualStudio Add-in 1.2.4 not populating the QTDIR macro

Scheduled Pinned Locked Moved Qt Creator and other tools
1 Posts 1 Posters 3.8k Views 1 Watching
  • 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.
  • F Offline
    F Offline
    fsilva
    wrote on last edited by
    #1

    I saw (but now can't find again) a bug related to this issue that was already fixed in an older version but it is happening to me every time the *.vcxproj.user file is deleted.

    Qt5 Add-In re-creates it but does not set the QTDIR macro.

    As you can see in the below example, the add-in adds the $(QTDIR)\bin path to the PATH environment variable but does not declare the QTDIR macro.

    @<?xml version="1.0" encoding="utf-8"?>
    <Project ToolsVersion="12.0" >
    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <LocalDebuggerEnvironment>PATH=$(QTDIR)\bin;$(PATH)</LocalDebuggerEnvironment>
    </PropertyGroup>
    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <LocalDebuggerEnvironment>PATH=$(QTDIR)\bin;$(PATH)</LocalDebuggerEnvironment>
    </PropertyGroup>
    </Project>@

    The correct file content (which I have to manually modifiy for all projects in the whole solution) is the following:

    @<?xml version="1.0" encoding="utf-8"?>
    <Project ToolsVersion="12.0" >
    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <LocalDebuggerEnvironment>PATH=$(QTDIR)\bin;$(PATH)</LocalDebuggerEnvironment>
    <QTDIR>C:\Qt5\5.3\msvc2013</QTDIR>
    </PropertyGroup>
    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <LocalDebuggerEnvironment>PATH=$(QTDIR)\bin;$(PATH)</LocalDebuggerEnvironment>
    <QTDIR>C:\Qt5\5.3\msvc2013</QTDIR>
    </PropertyGroup>
    </Project>@

    Seems important to note that in our scenario we have 3 different Qt versions installed in parallel. The Solution's Qt version is the default one but is set by name instead of using the DefaultQtVersion macro, so the *.vcxproj files have something like:

    @Qt5Version_x0020_Win32="5.3"@

    instead of:

    @Qt5Version_x0020_Win32="$(DefaultQtVersion)"@

    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