+ Reply to Thread
Results 1 to 6 of 6

Thread: Static Qt with static CRT (VS 2008)

  1. #1

    Default Static Qt with static CRT (VS 2008)

    Hi All,

    Recently I decided to use statically linked Qt in one of my applications (compiled with VS2008). I used following command to configure compilation:
    Qt Code:
    1. configure -static -platform win32-msvc2008 -no-webkit
    To copy to clipboard, switch view to plain text mode 
    It works fine, but Qt libs are still referring to "multithreaded DLL" and "multithreaded debug DLL" CRT and this conflicts with my project settings.
    Is there a way to changed it to "multithreaded" and "multithreaded debug" ?

    BR,
    JF

  2. #2

    Default Re: Static Qt with static CRT (VS 2008)

    To be precise I want to compile Qt with compiler option /MT and not /MD.
    Is this possible to set it somewhere ?

  3. #3
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,317
    Thanks
    20
    Thanked 377 Times in 371 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Static Qt with static CRT (VS 2008)

    Project Properties->Configuration Properties->C++->Code generation->Runtime library
    Recommended off-line reading:
    The Foundations of Qt Development (ISBN: 1-59059-831-8)

  4. #4

    Default Re: Static Qt with static CRT (VS 2008)

    Hi. That was a nice clue. I always used nmake to compile Qt, but indeed it is possible to open vcproj, change it and compile under IDE. Thanks.

  5. #5
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    853
    Thanked 167 Times in 163 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Static Qt with static CRT (VS 2008)

    Or look at file

    %QDIR%\mkspecs\win32-msvc2008\qmake.conf

    and just replace -MD with -MT in lines QMAKE_CFLAGS_RELEASE and QMAKE_CFLAGS_DEBUG

  6. #6

    Default Re: Static Qt with static CRT (VS 2008)

    Thanks. That was even better. I changed the file, typed:
    Qt Code:
    1. namake confclean
    2. configure -static -platform win32-msvc2008 -no-webkit
    3. nmake sub-src
    To copy to clipboard, switch view to plain text mode 
    and hour later I was ready to go .

+ Reply to Thread

Similar Threads

  1. Static linking problem with gif plugin, qt 4.6.2, vs 2008
    By colin207 in forum Qt Programming
    Replies: 3
    Last Post: 25th June 2010, 14:39
  2. Qt 4.6.0 static
    By vdolek in forum Installation and Deployment
    Replies: 3
    Last Post: 28th December 2009, 12:51
  3. Rebuild Qt 4.5.1 Static
    By tinti in forum Installation and Deployment
    Replies: 1
    Last Post: 4th May 2009, 13:04
  4. Replies: 22
    Last Post: 8th October 2008, 13:54
  5. Replies: 4
    Last Post: 14th February 2006, 21:35

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