Results 1 to 13 of 13

Thread: Deployment of Static Qt on Windows?

  1. #1
    Join Date
    Jan 2007
    Posts
    326
    Thanks
    42
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Deployment of Static Qt on Windows?

    Hi all

    Working on Qt 4.3.4 on windows using Microsoft Visual Studio 5? I am using dynamic version of Qt, Now i want to build it statically, Pls explain me the steps to build Qt Statically.
    Always Believe in Urself
    Merry

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Deployment of Static Qt on Windows?

    Are you referring to the tool released somewhere in the mid 90's? Or did you mean Visual Studio 2005? Have you tried searching the forums? This question has been asked quite many times...
    J-P Nurmi

  3. #3
    Join Date
    Jan 2007
    Posts
    326
    Thanks
    42
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: Deployment of Static Qt on Windows?

    I mean Visual Studio 2005, yaa i tried searching and i got the answer.....and also implemented....can u pls tell me , how much time taken for building Qt static.
    Always Believe in Urself
    Merry

  4. #4
    Join Date
    Jan 2007
    Posts
    326
    Thanks
    42
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: Deployment of Static Qt on Windows?

    After deploying Static Qt4.3.4, I tried to compile my application in release mode using static Qt...i got some fatal errors:

    NMAKE : fatal error U1077: ' "C:\Program Files\Microsoft Visual Studio 8\VC\BIN\LINK.EXE"' : return code '0x460'
    Stop

    NMAKE : fatal error U1077: ' "C:\Program Files\Microsoft Visual Studio 8\VC|BIN\Nmake.exe"' : return code '0x2'
    Stop
    why i got these errors and what to do?
    Last edited by merry; 19th July 2008 at 06:03. Reason: missing [code] tags
    Always Believe in Urself
    Merry

  5. #5
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Deployment of Static Qt on Windows?

    What is the first error message?
    J-P Nurmi

  6. #6
    Join Date
    Jan 2007
    Posts
    326
    Thanks
    42
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: Deployment of Static Qt on Windows?

    first error:

    e
    rror LNK2019 : unresolved external symbol "class QObject * __cdec1 qt_plugin_instance_qjpeg<void>" <?qt_plugin_instance_qjpeg@@YAPAVQObject@@XZ> referenced in function "public:__thiscall Static qjpegPluginInstance::staticqjpegPluginInstance::St aticqjpegPluginInstance<void>"<??0StaticqgifPlugin Istance@@QAE@XZ>

    error LNK2019 : unresolved external symbol "class QObject * __cdec1 qt_plugin_instance_qgif<void>" <?qt_plugin_instance_qgif@@YAPAVQObject@@XZ> referenced in function "public:__thiscall Static qgifPluginInstance::staticqgifPluginInstance::Stat icqgifPluginInstance<void>"<??0StaticqgifPluginIst ance@@QAE@XZ>


    error LNK2019 : unresolved external symbol "class QObject * __cdec1 qt_plugin_instance_qtiff<void>" <?qt_plugin_instance_qtiff@@YAPAVQObject@@XZ> referenced in function "public:__thiscall Static qtiffPluginInstance::staticqgifPluginInstance::Sta ticqtiffPluginInstance<void>"<??0StaticqtiffPlugin Istance@@QAE@XZ>
    Always Believe in Urself
    Merry

  7. #7
    Join Date
    Jan 2006
    Location
    Bremen, Germany
    Posts
    554
    Thanked 86 Times in 81 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Deployment of Static Qt on Windows?

    You forgot to link to your staitc plugins: http://doc.trolltech.com/4.3/plugins...static-plugins

  8. #8
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Deployment of Static Qt on Windows?

    J-P Nurmi

  9. #9
    Join Date
    Jul 2008
    Location
    india
    Posts
    12
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows Symbian S60

    Default Re: Deployment of Static Qt on Windows?

    Hi,

    do onething,

    try to install qt using cmd.

    ./configure -static -qt-gif -qt-jpeg

    NMAKE

    NOTE:Check the error . it will tell you to use that particular qt library instead of normal library.

    enjoy


    regards
    Biswajit

  10. #10
    Join Date
    Jan 2007
    Posts
    326
    Thanks
    42
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: Deployment of Static Qt on Windows?

    You forgot to link to your staitc plugins

    No I wont forgot to link to my static plugins

    in .pro file I added

    QTPLUGIN +=qjpeg qgif qtiff

    in main.cpp I define all plugins:;

    Q_IMPORT_PLUGIN(qjpeg)
    Q_IMPORT_PLUGIN(qgif)
    Q_IMPORT_PLUGIN(qtiff)
    Always Believe in Urself
    Merry

  11. #11
    Join Date
    Jan 2007
    Posts
    326
    Thanks
    42
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: Deployment of Static Qt on Windows?

    Thanks 4 replies

    Ok i ll try to install qt using cmd and let u know
    Always Believe in Urself
    Merry

  12. #12
    Join Date
    Jan 2006
    Location
    Bremen, Germany
    Posts
    554
    Thanked 86 Times in 81 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Deployment of Static Qt on Windows?

    Then you forgot to rerun qmake or something like this. You definitely don't link against static qjpeg plugin - otherwise you won't get those linker errors!

  13. #13
    Join Date
    Jan 2007
    Posts
    326
    Thanks
    42
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: Deployment of Static Qt on Windows?

    now i added
    config += static
    in the plugin.pro file , then it doesnt return the previous error but generates some other linking error

    LINK : fatal error LNK1104: cannot open file 'c:\Qt\Qt4.3.4l\lib\QtGuid.lib'
    NMAKE : fatal error U1077: ' "C:\Program Files\Microsoft Visual Studio 8\VC\BIN\LINK.EXE"' : return code '0x450'
    Stop

    NMAKE : fatal error U1077: ' "C:\Program Files\Microsoft Visual Studio 8\VC|BIN\Nmake.exe"' : return code '0x2'
    Stop
    but with the same it generates the manifest file and exe of my application and exe also runs fine.
    Always Believe in Urself
    Merry

Similar Threads

  1. Windows mobile 6 deployment
    By Gilles.Bordas in forum Installation and Deployment
    Replies: 4
    Last Post: 7th July 2008, 11:06
  2. Replies: 16
    Last Post: 23rd May 2008, 10:12
  3. Qt 4.3 static linking on Windows
    By john_crichton in forum Installation and Deployment
    Replies: 2
    Last Post: 13th May 2008, 06:57
  4. Windows XP Qt 4.3.2 Static build
    By maxpower in forum Installation and Deployment
    Replies: 9
    Last Post: 2nd November 2007, 04:49
  5. qt deployment problem on windows xp
    By sepp in forum Installation and Deployment
    Replies: 3
    Last Post: 5th July 2007, 11:16

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.