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,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

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

    Project Properties->Configuration Properties->C++->Code generation->Runtime library
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  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
    1,536
    Thanked 284 Times in 279 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 .

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, 15:39
  2. Qt 4.6.0 static
    By vdolek in forum Installation and Deployment
    Replies: 3
    Last Post: 28th December 2009, 13:51
  3. Rebuild Qt 4.5.1 Static
    By tinti in forum Installation and Deployment
    Replies: 1
    Last Post: 4th May 2009, 14:04
  4. Replies: 22
    Last Post: 8th October 2008, 14:54
  5. Replies: 4
    Last Post: 14th February 2006, 22: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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.