Results 1 to 5 of 5

Thread: How can I build <<hello world>> example statically

  1. #1
    Join Date
    Jan 2006
    Posts
    36
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default How can I build <<hello world>> example statically

    Hello All !

    I build QT's hello world example.
    And ldd shows:

    ldd qt
    libQtGui_debug.so.4 => /usr/local/Trolltech/Qt-4.0.0/lib/libQtGui_debug.so.4 (0x00111000)
    libpng12.so.0 => /usr/lib/libpng12.so.0 (0x00e1c000)
    libSM.so.6 => /usr/X11R6/lib/libSM.so.6 (0x0067a000)
    libICE.so.6 => /usr/X11R6/lib/libICE.so.6 (0x00682000)
    libXi.so.6 => /usr/X11R6/lib/libXi.so.6 (0x00c3f000)
    libXrender.so.1 => /usr/X11R6/lib/libXrender.so.1 (0x00699000)
    libXrandr.so.2 => /usr/X11R6/lib/libXrandr.so.2 (0x006a1000)
    libXcursor.so.1 => /usr/X11R6/lib/libXcursor.so.1 (0x00a44000)
    libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x006a5000)
    libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x006f5000)
    libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x00fe4000)
    libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x0078c000)
    libQtCore_debug.so.4 => /usr/local/Trolltech/Qt-4.0.0/lib/libQtCore_debug.so.4 (0x0086b000)
    libz.so.1 => /usr/lib/libz.so.1 (0x0071c000)
    libdl.so.2 => /lib/libdl.so.2 (0x0072a000)
    libpthread.so.0 => /lib/tls/libpthread.so.0 (0x0072d000)
    libstdc++.so.6 => /usr/local/lib/gcc/i686-pc-linux-gnu/4.0.0/libstdc++.so.6 (0x00a4d000)
    libm.so.6 => /lib/tls/libm.so.6 (0x00cae000)
    libgcc_s.so.1 => /usr/local/lib/gcc/i686-pc-linux-gnu/4.0.0/libgcc_s.so.1 (0x00c6f000)
    libc.so.6 => /lib/tls/libc.so.6 (0x00cd0000)
    libexpat.so.0 => /usr/lib/libexpat.so.0 (0x0073d000)
    /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00a18000)


    How can I build this example statically, i.e.
    ldd ./hello-world
    not a dynamic executable

    P.S.
    OS - Red Hat Enterprise Linux 3 u5
    gcc - 4.0.0
    QT - 4.0.0
    glibc - 2.3.2

  2. #2
    Join Date
    Jan 2006
    Location
    Frankfurt
    Posts
    500
    Thanks
    1
    Thanked 52 Times in 52 Posts
    Platforms
    MacOS X Unix/X11

    Default Re: How can I build <<hello world>> example statically

    Do you have the static version of the Qt-libs in your Qtdir? These are files with extension .a.
    It's nice to be important but it's more important to be nice.

  3. #3
    Join Date
    Jan 2006
    Posts
    36
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: How can I build <<hello world>> example statically

    My QT installation is default (i don't remember static or shared).

  4. #4
    Join Date
    Jan 2006
    Posts
    36
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: How can I build <<hello world>> example statically

    Only *.so *.la *.prl

  5. #5
    Join Date
    Jan 2006
    Location
    Frankfurt
    Posts
    500
    Thanks
    1
    Thanked 52 Times in 52 Posts
    Platforms
    MacOS X Unix/X11

    Default Re: How can I build <<hello world>> example statically

    Then you will have to recompile Qt. ./configure of Qt has a flag to compile a static version of the lib. I'm not sure wether you can have both static and dynamic build at once in the same directory, so building in another directory might be wise.
    It's nice to be important but it's more important to be nice.

Similar Threads

  1. Build error on mac Platform::WaitMouseMoved
    By patrik08 in forum Qt Programming
    Replies: 1
    Last Post: 12th July 2007, 14:18

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.