Results 1 to 13 of 13

Thread: A difference between debug build with gcc and vc++

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #10
    Join Date
    Jul 2009
    Location
    Italy, Pieve Ligure (GE)
    Posts
    55
    Thanks
    7
    Thanked 6 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: A difference between debug build with gcc and vc++

    Quote Originally Posted by piotr.dobrogost View Post
    I'm building using both gcc and vc++.
    When building formextractor example in debug mode gcc executable is 1 114 050 bytes and vc++ one is 75 776 bytes. When running, gcc executable runs ok but vc++ one gives error about not being able to find msvcr90d.dll file. It looks like gcc links with this statically whereas vc++ links dynamically.

    How can I configure both builds in creator to have the same behavior in respect to linking to run-time libraries?
    Hi,

    Possibly it is not related to libraries. By default, vc++ does NOT include debug info in the executable but in an external <appname>.pdb file. This probably accounts for (the major part of) the difference in size.

    The error about msvcr90.dll is probably another matter; I may be wrong, but I don't think that gcc needs this library at all; that's why it does not complain. On the other hand, vc++ does need it and you may not have it in your path.

    The compiler option for statically linking the runtime library is /MT (/MTd for debug version), while the option for using DLL is /MD (/MDd for debug version).

    Hope it helps.

    Miwarre

  2. The following user says thank you to miwarre for this useful post:

    piotr.dobrogost (21st July 2009)

Similar Threads

  1. Build Qt under cygwin with gcc
    By lixo1 in forum Installation and Deployment
    Replies: 0
    Last Post: 22nd June 2009, 11:37
  2. Unable to build Qt 4.4.0 debug libs with MinGW (pch error)
    By AlGaN in forum Installation and Deployment
    Replies: 2
    Last Post: 7th June 2008, 14:24
  3. How to build in debug mode?
    By Weilor in forum Newbie
    Replies: 5
    Last Post: 15th February 2006, 14:02

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.