Results 1 to 2 of 2

Thread: How to use environmental variables when import non Qt project

  1. #1
    Join Date
    Jun 2015
    Location
    India
    Posts
    185
    Thanks
    8
    Thanked 14 Times in 14 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default How to use environmental variables when import non Qt project

    I have imported my non Qt project (plain c++ project) into Qt creator, So i have provided enough info in .config, .files & .includes.
    I have few environmental variables set in my project from where I have some of my libraries so in .includes I wanted to use this variables but foe some reason this env variables are not working.

    Ex: /usr/myprj/mylibs/QtLibs/includes/QtCore - absolute path is working fine & Qt creator able to recognize my header files
    But, $$MY_QT_LIB/QtCore (where MY_QT_LIB is environmental variable & set to /usr/myprj/mylibs/QtLibs/includes/) , Now my Qt creator is not able to recognize my header files in project.

    (tried $MY_QT_LIB/QtCore also, did n't work).

    Do I need to configure this environmental variables somewhere in Qt creator or will they get set automatically when I launch Qt creator from same terminal where my environment got set ???
    If we need to configure this variables in Qt creator, please tell me the location.

    Environment : Linux, Qt 3.2.1

    Thanks alot :-)
    Thanks :-)

  2. #2
    Join Date
    Jun 2015
    Location
    India
    Posts
    185
    Thanks
    8
    Thanked 14 Times in 14 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: How to use environmental variables when import non Qt project

    $$(MY_QT_LIB)/QtCore did the trick. should enclose env variables with () & Qt creator is taking all the environmental variables of the shell from where we launch Qt creator.

    Thanks.
    Thanks :-)

Similar Threads

  1. import all files in makefile project
    By ransh in forum Qt Tools
    Replies: 2
    Last Post: 10th November 2014, 18:21
  2. How to import Qt class into C++ project?
    By David812 in forum Qt Programming
    Replies: 3
    Last Post: 12th September 2011, 11:19
  3. Replies: 1
    Last Post: 25th February 2011, 15:08
  4. Environment variables in project .includes?
    By Karmaflute in forum Qt Tools
    Replies: 4
    Last Post: 26th November 2009, 00:59
  5. environmental variables
    By mohanakrishnan in forum Newbie
    Replies: 4
    Last Post: 26th October 2009, 09:43

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.