Results 1 to 13 of 13

Thread: How to code an App that will build QT projects

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2010
    Posts
    64
    Thanks
    18
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to code an App that will build QT projects

    It seems that the OBJECT_DIR is a .pro variable. That means that I need to change the .pro file of all projects that I will build, or it is possible to set that variable in the QProcess or in the qmake as an argument or similar. I havent found anything like that.

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: How to code an App that will build QT projects

    Try
    Qt Code:
    1. C:\Qt\2010.01\qt\qmake\qmake.exe "OBJECT_DIR = C:/testbuild" C:\where\your\project\is\MyProject.pro -spec C:\Qt\2010.01\qt\mkspecs\win32-g++
    To copy to clipboard, switch view to plain text mode 

  3. The following user says thank you to tbscope for this useful post:

    locke (24th August 2010)

  4. #3
    Join Date
    Feb 2010
    Posts
    64
    Thanks
    18
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to code an App that will build QT projects

    I havent used OBJECT_DIR becasue it only moves the .o files , but not the make files. So I did use QProcess::setWorkingDirectory ( const QString & dir ) before launching the process and I know where the make files are created.

  5. #4
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: How to code an App that will build QT projects

    Does it work now?

  6. #5
    Join Date
    Feb 2010
    Posts
    64
    Thanks
    18
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to code an App that will build QT projects

    Yes, it creates the makefile files in a located folder. Im triying now to make the second step, with mingw32-make.

  7. #6
    Join Date
    Feb 2010
    Posts
    64
    Thanks
    18
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to code an App that will build QT projects

    For the next people having the same problem.

    Do not use "C:/Qt/2010.01/qt/qmake/qmake.exe"

    Use "C:/Qt/2010.01/qt/bin/qmake.exe";

    Both qmake will create a different makefile and if you choose the first one, you will have problems to build the project.

Similar Threads

  1. Replies: 1
    Last Post: 15th June 2010, 13:25
  2. Replies: 1
    Last Post: 13th January 2010, 23:35
  3. new projects ???
    By sujan.dasmahapatra in forum Qt Programming
    Replies: 0
    Last Post: 2nd March 2009, 10:21
  4. build code using vs 2005
    By arunredi in forum Installation and Deployment
    Replies: 3
    Last Post: 14th May 2008, 18:42

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.