Results 1 to 2 of 2

Thread: Create a static application for linux using QT.

  1. #1
    Join Date
    Jan 2010
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Create a static application for linux using QT.

    Hi,

    How do i compile a static application for linux using qt?
    I am using QT 4.6 SDK to write the programs
    Using http://qtnode.net/wiki?title=Building_static for a guide, I have run configure -static and mingw32-make sub-src using the QT Command prompt in windows.
    The process took a few hrs and i compiled the program in windows which created a 9.32mb executable and i copied 4 .dll files over to the same folder and i am able to run the executable normally.
    Do i also need to do the same for linux OS (configure -static and make sub-src) to make a static application?

    Qt Code:
    1. # -------------------------------------------------
    2. # Project created by QtCreator 2010-01-11T17:41:55
    3. # -------------------------------------------------
    4. CONFIG += static
    5. CONFIG += staticlib
    6. static {
    7. TARGET = test
    8. TEMPLATE = app
    9. SOURCES += main.cpp \
    10. mainwindow.cpp
    11. HEADERS += mainwindow.h
    12. FORMS += mainwindow.ui
    13. OTHER_FILES += Icons/Thumbs.db \
    14. Icons/onebit_26.png \
    15. Icons/onebit_24.png \
    16. Icons/onebit_18.png \
    17. Icons/onebit_13.png \
    18. Icons/onebit_12.png \
    19. Icons/onebit_10.png \
    20. Icons/onebit_09.png \
    21. Icons/macforger.JPG \
    22. Icons/icon-20.png \
    23. Icons/icon-19.png \
    24. Icons/icon-16.png \
    25. Icons/icon-11.png \
    26. Icons/icon-06.png \
    27. Icons/icon-04.png \
    28. Icons/002_26.ico \
    29. Icons/002_04.ico \
    30. Icons/test_4.PNG
    31. }
    To copy to clipboard, switch view to plain text mode 

  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: Create a static application for linux using QT.

    Yes, it works the same on linux. But what 4 dlls where still required? I guess the runtime for the compiler. You should not need to copy those over on linux.
    It's nice to be important but it's more important to be nice.

Similar Threads

  1. Replies: 0
    Last Post: 4th November 2009, 07:45
  2. Static linking in Linux
    By anupamgee in forum Qt Programming
    Replies: 4
    Last Post: 2nd June 2009, 14:34
  3. Create a DLL with a static build of Qt 4.3
    By ucomesdag in forum Qt Programming
    Replies: 4
    Last Post: 7th May 2008, 14:12
  4. How to create package for a Qt4 application in linux..?
    By archanasubodh in forum Installation and Deployment
    Replies: 24
    Last Post: 6th March 2008, 12:20
  5. Replies: 2
    Last Post: 12th January 2007, 11:19

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.