Results 1 to 5 of 5

Thread: Help compiling Qt4 Application

  1. #1
    Join Date
    Mar 2007
    Posts
    31
    Thanks
    13
    Qt products
    Qt4
    Platforms
    Unix/X11

    Question Help compiling Qt4 Application

    Hello everyone, I have developed an small application using Qt4 and QtOpengl module, but I need to run it in a Linux system without Qt4 libs installed.

    I have read about compiling using static libraries, but I need help.
    How can I do that?


    Thanks.

  2. #2
    Join Date
    Oct 2007
    Location
    Munich, Bavaria
    Posts
    144
    Thanks
    1
    Thanked 19 Times in 19 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Help compiling Qt4 Application

    Why don't you just use Qt4 packages on linux.
    It's so easy to get the libs installed on Linux without compilation.

  3. The following user says thank you to DeepDiver for this useful post:

    drake1983 (14th November 2007)

  4. #3
    Join Date
    Mar 2007
    Posts
    31
    Thanks
    13
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Help compiling Qt4 Application

    hi again, thanks for your answer and forgive my English.

    this is what I want to do:

    I have developed a Qt Application using Qt4 on Linux.
    The app binary runs on my computer because I have Qt4 installed, but, how can I run it in another computer without Qt? For example, On windows you put together the .exe and some Qt's dll, like QtCore.dll, and It runs everywere. I want to do that, in Linux.


    Thanks!!

  5. #4
    Join Date
    Nov 2007
    Location
    India
    Posts
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Help compiling Qt4 Application

    Hi,
    I guess what you want to do is to have your application run on a system regardless of whether Qt is installed on that system or not.

    So basically you are looking for static linking against Qt libraries. Now, in order to link statically against Qt, static Qt libraries must exists in the first place.
    AFAIK, you can build Qt with static libraries by using the static option while configuring

    Qt Code:
    1. configure -static #see configure --help for more
    To copy to clipboard, switch view to plain text mode 

    Also, I think -static & -shared are mutually exclusive because I didn't see any option like -debug-and-release

    Let me warn you that using static libraries will probably increase your disk space requirement exponentially. On my Windows system Qt built with shared libraries takes around 1.65 GB, it think it could easily take 5~10 GB using static libraries or maybe even more.

    HTH

  6. #5
    Join Date
    Mar 2007
    Posts
    31
    Thanks
    13
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Help compiling Qt4 Application

    Yes, that's exactly what I want, thanks so much for your answer.

Similar Threads

  1. Replies: 7
    Last Post: 28th June 2007, 17:18
  2. Replies: 5
    Last Post: 26th June 2007, 13:10
  3. dll + application
    By fpujol in forum Qt Programming
    Replies: 11
    Last Post: 15th April 2007, 18:37
  4. Replies: 10
    Last Post: 28th April 2006, 15:48

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.