Results 1 to 11 of 11

Thread: how to create standalone executable file for any ubuntu system

  1. #1
    Join Date
    Nov 2014
    Location
    Chennai
    Posts
    160
    Thanks
    65
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default how to create standalone executable file for any ubuntu system

    I need a stand alone executable files which can be installed on any Ubuntu system.i already created my QT program.i need to convert this to standalone executable file for ubuntu system.please can any one help me for this
    Thanks in advance

  2. #2
    Join Date
    Dec 2009
    Location
    New Orleans, Louisiana
    Posts
    791
    Thanks
    13
    Thanked 153 Times in 150 Posts
    Qt products
    Qt5
    Platforms
    MacOS X

    Default Re: how to create standalone executable file for any ubuntu system

    You will have to build a static version of the Qt libraries and link against the static Qt libraries instead of the dynamic Qt libraries.

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

    iswaryasenthilkumar (6th May 2015)

  4. #3
    Join Date
    Apr 2013
    Location
    Prague
    Posts
    258
    Thanks
    3
    Thanked 65 Times in 59 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: how to create standalone executable file for any ubuntu system

    First of all, you need static libraries (not DLLs or so's) for Qt and link your app statically - both for 32-bit and for 64-bit. That's because your target Ubuntu's need not have Qt installed (they can be Gnome-based or use another desktop environment). AFAIK, the static Qt libraries need some license. Even if you can download Qt sources (about 700 MB of code) and compile the static libraries (both 32-bit and 64-bit) yourself, you may not be allowed to distribute your statically linked apps. Also prepare for your apps becoming really huge in size (many MB). Even then I am not sure that your apps will run on any Ubuntu. Ubuntu is a developing OS so that the old APIs need not be compatible with the contemporary ones.

    It's a rather "challenging" task.

  5. The following user says thank you to Radek for this useful post:

    iswaryasenthilkumar (6th May 2015)

  6. #4
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: how to create standalone executable file for any ubuntu system

    It's a rather "challenging" task.
    Much more challenging than the poster is capable of, if you've read any of the previous threads. The poster isn't even aware of what an executable file is.

  7. #5
    Join Date
    Nov 2014
    Location
    Chennai
    Posts
    160
    Thanks
    65
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: how to create standalone executable file for any ubuntu system

    yes you are right d_stranz ...but i will not b same lik this..i will improve,,one day am sure i too will be experts in Qt.am a beginner for programming language i will learn to improve my programming knowlegde
    Quote Originally Posted by d_stranz View Post
    Much more challenging than the poster is capable of, if you've read any of the previous threads. The poster isn't even aware of what an executable file is.

  8. #6
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: how to create standalone executable file for any ubuntu system

    but i will not b same lik this...i will learn to improve my programming knowlegde
    Yes, I am sure you will, and I hope you have great success. But right now, the job you are trying to do is much, much bigger than your current knowledge. We try to help when we can, but it is very difficult for us because there are so many basic things that you don't know about yet.

    You need to find someone at your company or school who can help you with some of the things you are struggling with - someone who can look over your shoulder and see what you are doing - and who can see where you are going wrong.

  9. #7
    Join Date
    Nov 2014
    Location
    Chennai
    Posts
    160
    Thanks
    65
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: how to create standalone executable file for any ubuntu system

    sorry soon i will improve d_stranz,, i know am in still down each day i will improve soon,Thanx for your guide


    Quote Originally Posted by d_stranz View Post
    Yes, I am sure you will, and I hope you have great success. But right now, the job you are trying to do is much, much bigger than your current knowledge. We try to help when we can, but it is very difficult for us because there are so many basic things that you don't know about yet.

    You need to find someone at your company or school who can help you with some of the things you are struggling with - someone who can look over your shoulder and see what you are doing - and who can see where you are going wrong.
    simply i created Qt widget now i want to add static libraries to get executable file for ubuntu,,can you please give some examples to add libraries in Qt project and also i have doubt how to find Qt libraries
    Quote Originally Posted by jefftee View Post
    You will have to build a static version of the Qt libraries and link against the static Qt libraries instead of the dynamic Qt libraries.

  10. #8
    Join Date
    Oct 2009
    Posts
    483
    Thanked 97 Times in 94 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: how to create standalone executable file for any ubuntu system

    Bundling libraries with an application is discouraged on Ubuntu, not to mention licensing issues. Do you really need a standalone executable or are you just looking for a way to package your application for any Ubuntu system? In the latter case, this kind of problem is solved by the package management system. You need to build a package (.deb file) from your application and declare its dependencies (including the relevant Qt packages).

  11. #9
    Join Date
    Nov 2014
    Location
    Chennai
    Posts
    160
    Thanks
    65
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: how to create standalone executable file for any ubuntu system

    Yes olive i need a standalone executable file,,because if my friend or client need my project means i want to givce only exe file and also i should not show the code ,i should give only my exe file,thats why i asked i want to create or procedure to do standalone executable file for any ubuntu system
    above friends suggested me to create static libraires for qt and to link with my app,,i also did well successfuly
    my finame.pro
    Qt Code:
    1. QT += core gui
    2.  
    3. TARGET = staticlink
    4. TEMPLATE = app
    5.  
    6.  
    7. SOURCES += main.cpp\
    8. widget.cpp
    9.  
    10. HEADERS += widget.h \
    11. ../statLib/statlib.h
    12.  
    13. FORMS += widget.ui
    14.  
    15. INCLUDEPATH += "/home/user1/statLib"
    16. LIBS += "/home/user1/statLib-build-desktop-Qt_4_8_1_in_PATH__System__Release/libstatLib.a"
    To copy to clipboard, switch view to plain text mode 
    now i got 4 folder myfilename,myfilebuild(release),staicfolder,static build(release),,did i created my standalone executable file,??
    Quote Originally Posted by yeye_olive View Post
    Bundling libraries with an application is discouraged on Ubuntu, not to mention licensing issues. Do you really need a standalone executable or are you just looking for a way to package your application for any Ubuntu system? In the latter case, this kind of problem is solved by the package management system. You need to build a package (.deb file) from your application and declare its dependencies (including the relevant Qt packages).

  12. #10
    Join Date
    Oct 2009
    Posts
    483
    Thanked 97 Times in 94 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: how to create standalone executable file for any ubuntu system

    Do you have a commercial license for Qt? If you do not, then you have been developing your software with the LGPL version, and you are now bound by that license, which limits the ways in which you can distribute your application. If you distribute an executable that was statically linked with Qt, and you do not want to distribute your source code, then you must provide the object files and the Makefile to allow any user to relink your application with another version of Qt. See http://www.gnu.org/licenses/gpl-faq....taticVsDynamic.

  13. The following user says thank you to yeye_olive for this useful post:

    iswaryasenthilkumar (7th May 2015)

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

    Default Re: how to create standalone executable file for any ubuntu system

    Quote Originally Posted by iswaryasenthilkumar View Post
    because if my friend or client need my project means i want to givce only exe file and also i should not show the code
    This doesn't mean you have to make your binary static. You can deploy your executable along all the libraries it requires. Just like pretty much almost anyone else in the world does.
    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.


Similar Threads

  1. Replies: 4
    Last Post: 26th May 2014, 14:48
  2. How to create executable in Ubuntu
    By WingFalcon in forum Installation and Deployment
    Replies: 2
    Last Post: 19th June 2013, 13:20
  3. How to Create Executable file for my program
    By ay in forum Qt Programming
    Replies: 4
    Last Post: 29th September 2012, 15:39
  4. How to Create Executable file for my QT application
    By c_srikanth1984 in forum Qt Programming
    Replies: 2
    Last Post: 19th March 2009, 04:02
  5. How to create a standalone executable?
    By Ashish in forum Qt Programming
    Replies: 1
    Last Post: 25th January 2007, 15:04

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.