Results 1 to 5 of 5

Thread: build debug with shared and release with static?

  1. #1
    Join Date
    Apr 2008
    Posts
    8
    Thanks
    1
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Question build debug with shared and release with static?

    I see how to build QT for either static or shared. And I see how to build debug and release. But is it possible to use debug/shared and release/static for ongoing development?

    I like the speed and size during development, but want to minimize file distribution for testing/release.

    Thanks.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 975 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: build debug with shared and release with static?

    You can have two builds --- one static and one dynamic. To switch between them you just have to run appropriate qmake binary (provided that you use qmake).You can even make a qmake-static and qmake-dynamic symlinks to speed things up.

  3. #3
    Join Date
    Apr 2008
    Posts
    8
    Thanks
    1
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: build debug with shared and release with static?

    Yes, but could I use them at the same time without rebuilding QT?

    I think I am not expressing myself clearly. If I understand correctly, using the two different qmake options would force me to rebuild QT each time that I switched between debug/shared and release/static. That is what I was trying to avoid.

    Would switching between the two setups require rebuilding QT each time? It seems that whenever I run qmake, the previous setup is removed.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 975 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: build debug with shared and release with static?

    Quote Originally Posted by Thor28 View Post
    Would switching between the two setups require rebuilding QT each time?
    No, those two setups won't know anything about each other.

    Quote Originally Posted by Thor28 View Post
    It seems that whenever I run qmake, the previous setup is removed.
    Where do you run qmake?

    If you have different Qt builds in different directories each of them has its own qmake binary. To make your project use some Qt build, you have to run qmake from that build's bin directory. This works the best with "out of source" building style.

  5. The following user says thank you to jacek for this useful post:

    Thor28 (14th April 2008)

  6. #5
    Join Date
    Apr 2008
    Posts
    8
    Thanks
    1
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: build debug with shared and release with static?

    OK, sounds like I need to have two separate directory trees for this. Thanks.

Similar Threads

  1. STATIC vs. SHARED
    By KaptainKarl in forum Installation and Deployment
    Replies: 1
    Last Post: 27th August 2007, 17:31
  2. Qt4 MacOSX UB Xcode and a static Qt build?
    By kuroyume0161 in forum Installation and Deployment
    Replies: 15
    Last Post: 18th March 2007, 09:10

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.