Results 1 to 2 of 2

Thread: Building a static QT executable with visual studio 2010

  1. #1
    Join Date
    Jul 2007
    Location
    California, USA
    Posts
    62
    Thanks
    17
    Thanked 7 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Building a static QT executable with visual studio 2010

    Is a simple step by step list of how to build a static executable with already built static QT libs in visual studio? I have tried searching but so far haven't found one. I have a simple dialog with QWebView in it. I have managed to build it dynamically (though I can only run it out of the qt command window after setting my qt libraries in the path).

    1>main.obj : error LNK2019: unresolved external symbol ___CxxFrameHandler3 referenced in function __ehhandler$_main
    1>webviewdialog.obj : error LNK2001: unresolved external symbol ___CxxFrameHandler3
    1>webviewdialog.obj : error LNK2019: unresolved external symbol "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) referenced in function __unwindfunclet$?setupUi@Ui_WebviewDialog@@QAEXPAV QDialog@@@Z$1
    1>webviewdialog.obj : error LNK2019: unresolved external symbol "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) referenced in function "public: void __thiscall Ui_WebviewDialog::setupUi(class QDialog *)" (?setupUi@Ui_WebviewDialog@@QAEXPAVQDialog@@@Z)
    1>webviewdialog.obj : error LNK2001: unresolved external symbol "const type_info::`vftable'" (??_7type_info@@6B@)
    1>LINK : error LNK2001: unresolved external symbol _WinMainCRTStartup
    1>LINK : error LNK2001: unresolved external symbol __load_config_used

    Any suggestions welcomed.

    qt 4.8.0
    visual studio 2010

    I have done this in the past but I don't have access to the project (and it was under visual studio 2005 so things may have changed).

  2. #2
    Join Date
    Aug 2012
    Location
    Tucson, AZ, USA
    Posts
    7
    Thanks
    7
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Building a static QT executable with visual studio 2010

    You'll need the following libraries to be linked in and make sure you don't include the default libs:

    qtmain.lib
    QtCore.lib
    QtGui.lib
    libcpmt.lib
    libcmt.lib
    ws2_32.lib
    kernel32.lib
    user32.lib
    gdi32.lib
    advapi32.lib
    imm32.lib
    winmm.lib
    comsupp.lib
    setupapi.lib
    Do it once, do it right.

Similar Threads

  1. Building qt-sql-mysql on Windows 7 with Visual Studio 2010
    By sandor in forum Installation and Deployment
    Replies: 0
    Last Post: 9th April 2011, 22:33
  2. Qt and Visual Studio 2010
    By SixDegrees in forum Qt Programming
    Replies: 6
    Last Post: 15th November 2010, 19:56
  3. Visual Studio Plugin (1.1.6) crashes Visual Studio (2010)
    By mboeni in forum Installation and Deployment
    Replies: 0
    Last Post: 11th October 2010, 16:46
  4. Plan for Visual Studio 2010 (MSVC 2010)?
    By Vinzz in forum Qt Programming
    Replies: 1
    Last Post: 18th April 2010, 17:42
  5. problem building 2009.3.1 with visual studio 2010 beta
    By majestik666 in forum Installation and Deployment
    Replies: 2
    Last Post: 25th September 2009, 04:13

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