MSVC2008 and qmake : build release with debug info



  • Hi,

    I need to build a release version with debug info pdb (to use with breakpad). I use MSVC 2008, all project are done with pro files, and i use qt vs addin to create project. I have read this http://developer.qt.nokia.com/faq/answer/how_to_build_pdb_for_release_version_of_qt
    I have tried to modify .qmake file accordingly but when I generate project in msvc there is no debug flag in release mode ... I don't understand where is the mistake ?


  • Moderators

    The problem is more a conceptional one, I guess.
    Why do you want to have a release compilation?
    Why do you want to have the debug information available?
    The debug information is part of the debug mode. It does not make naturally sense to have debug information available in release mode. I am not sure if this is any different for a Qt project. I would assume that it is similar in pure msvc projects.
    Try to make adjustments to the debug settings, if you cannot live with the standard debug settings.



  • I wants to have post mortem debug on release products : I use for that breakpad (http://code.google.com/p/google-breakpad/)
    For that I need to generate pdb files on release mode (I give to customer only the exe .. Not the pdb) and when the customer find a bug, he can send me the crash dump and I can debug this with the pdb file...
    So in short, I need to activate flag /Zi for compilation, and /Debug for link info in release mode.


  • Moderators

    Debug mode and release mode are some virtual terms often used. Within an IDE it is more a less a term for a bunch of settings, nothing more. In general you may define the debug mode with all settings as they would be used in release mode.
    At the day's end you may even provide a debug compilation to your customer. The customer may wonder about the size of the executable, but in most cases not really an issue.
    The /Zi flag is avaliable in debug mode only. So, you should use the debug mode for your compilation, if you need to have /Zi flag. You may try to set other settings as set in release mode. However, some of the flags may not be compatible with /Zi. So you cannot use them.



  • In fact, If I manually set the flag /zi and /debug in msvc in release mode it works fine ... My problem is to force qmake to generate a vcproj directly with these settings ( It seems possible regarding forum but I don't works for me)


  • Moderators

    I do not know how qmake interacts with vsaddin. I set up my Qt projects in msvc and compile them. The export functionality (.pro, .pri) I have used to be able to compile on linux. Yes, the import I have used, but I did not care about special settings so far.



  • [quote author="qtnext" date="1319976177"]In fact, If I manually set the flag /zi and /debug in msvc in release mode it works fine ... My problem is to force qmake to generate a vcproj directly with these settings ( It seems possible regarding forum but I don't works for me)[/quote]

    You could export the pro/pri files after setting that in msvs and check, if there is something in for this :-)



  • I have tryed to export a modified vcproj ... there is no special flag set in the pro files ..


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.