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. Documentation for setting environment variables in windows?
QtWS25 Last Chance

Documentation for setting environment variables in windows?

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 5.8k 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.
  • L Offline
    L Offline
    Laserbeak43
    wrote on 13 Mar 2013, 00:00 last edited by
    #1

    Hi,
    I've been having tons of issues with the latest Qt release(which can be seen in my post history) and i'm trying to tackle the next issue by setting environment variables. Is there documentation that tells me how to set them properly? cause Qt is complaining that they need to be set.

    1 Reply Last reply
    0
    • R Offline
      R Offline
      Rondog
      wrote on 13 Mar 2013, 00:33 last edited by
      #2

      For windows I create a shortcut that has the following settings:

      @
      Target: %COMSPEC% /k "C:\MinGW\bin\QT4_SETUP.BAT"
      Start In: %windir%
      @

      and my batch file 'QT4_SETUP.BAT' mentioned above looks like this:
      @
      @set PATH=c:\Qt;c:\Qt\4.8.1\bin;c:\MinGW\bin;%PATH%
      @set QMAKESPEC=win32-g++
      @set QTDIR=c:\Qt\4.8.1
      @CD /D "c:\MinGW\MyProjects"
      @

      When you run the shortcut you will end up with is a command prompt with whatever variables you need set (PATH, QMAKESPEC, QTDIR, etc).

      The other method is to set these variables globally for the system or the current user (in XP: Control Panel - System - Advanced - Environment Variables). I am not a fan of this method as the variables apply to everything.

      If you are using visual studio I believe they have a batch file to configure a command prompt. I haven't uses VS in a long (very long) time but I do remember seeing this. You should be able to modify this file to suite your needs.

      1 Reply Last reply
      0

      1/2

      13 Mar 2013, 00:00

      • Login

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