Results 1 to 4 of 4

Thread: Rebuilding Qt from source

  1. #1
    Join Date
    Jun 2012
    Posts
    8
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Rebuilding Qt from source

    Hi,

    I have a question about rebuilding Qt, I've been trying all day to get something working but have not been able to thus far.

    The situation is this, my development machine is running QtCreator with the 4.8.0 SDK. I have built a simple application (for the purposes of testing the rebuilt qt libraries) which requires only QtCore, it's a command line application that prints "Hello World".

    If I put this in a folder, along with the dependencies, set PATH to nothing and run from the command line the application runs and says "Hello World".

    Perfect.

    Now, I downloaded the source to 4.8.2 and built this (I used the settings from the .cache for my configure).

    Now, if I drop this DLL into the application folder and try running, I get an error about libstdc++-6.dll being missing, clearly what I've built is not how the SDK version was built.

    Furthermore, if I put this DLL in the folder, the application stops complaining about the DLL being missing, but subsequently crashes without showing "Hello World".

    By playing with the mkspec, I can get the libstdc++ to be statically linked into the binary so that the dependency goes, but I still crash.

    I should be able to replace the SDK 4.8.0 QtCore4.dll with my 4.8.2 "home built" DLL and the original application should be happy, but it isn't.

    My question is, how do I build Qt to exactly the same "spec" as the trolls did? I.e, compilers, options, path settings etc.

    I'm just about to try the experiment again but using the mingw from the 4.8.0 dist (I was using a different mingw) just incase that makes a difference.

    Any help or pointers would be appreciated.

    Thanks.

    Adrian

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

    PeterLLLLLL (13th July 2012)

  3. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Rebuilding Qt from source

    While configure.exe runs, it auto-detects features available on your system and builds Qt according to those. After detecting, it reports its decisions in the console. Make sure all features you need are detected and make sure (e.g. with dependency walker) the resulting library has similar dependencies as the original one. When you run your program, make sure all dependencies of your libraries are matched.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  4. #3
    Join Date
    Mar 2012
    Location
    Lesotho
    Posts
    33
    Qt products
    Qt4 Qt/Embedded Qt Jambi
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Rebuilding Qt from source

    how do i deploy qt application from ubuntu to run on windows(cross compiling):\?

  5. #4
    Join Date
    Jun 2012
    Posts
    8
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Rebuilding Qt from source

    Quote Originally Posted by wysota View Post
    While configure.exe runs, it auto-detects features available on your system and builds Qt according to those. After detecting, it reports its decisions in the console. Make sure all features you need are detected and make sure (e.g. with dependency walker) the resulting library has similar dependencies as the original one. When you run your program, make sure all dependencies of your libraries are matched.
    Thanks.

    The problem was actually the compiler, once I switched to using the compiler that came with the pre-built SDK, I was able to build a Qt from source that actually worked. I used the same settings that the binary SDK version was compiled with.

    Once I was able to build a version of Qt from source that worked (i.e I could drop in the Qt DLL's over my old ones) I was then able to apply the necessary patches to QtNetwork to hopefully fix the issues with NTLM authentication.

    Thanks for your help

    Adrian

  6. The following user says thank you to sn00p for this useful post:

    PeterLLLLLL (13th July 2012)

Similar Threads

  1. Rebuilding Qt 4.5.0
    By mpele in forum Installation and Deployment
    Replies: 9
    Last Post: 23rd May 2013, 16:05
  2. how do I clean QT? (Before rebuilding it)
    By gilamran in forum Qt Programming
    Replies: 7
    Last Post: 21st December 2010, 09:16
  3. Missing file errors when Rebuilding example projects
    By Thomas Wrobel in forum Newbie
    Replies: 1
    Last Post: 8th January 2010, 12:13
  4. mingw32-make keeps rebuilding
    By baray98 in forum General Programming
    Replies: 11
    Last Post: 10th March 2008, 18:19
  5. Qt rebuilding and source change
    By jgreetham in forum Installation and Deployment
    Replies: 2
    Last Post: 12th September 2007, 17:00

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.