Results 1 to 6 of 6

Thread: standalone Qt .Exe

  1. #1
    Join Date
    Jan 2007
    Location
    Paris
    Posts
    459
    Thanks
    98
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4 Qt5

    Default standalone Qt .Exe

    Hi,

    Here is my QT project release makefile:
    ################################################## ###########################
    # Makefile for building: client
    # Generated by qmake (2.01a) (Qt 4.3.0) on: lun. 23. juil. 21:15:59 2007
    # Project: client.pro
    # Template: app
    ################################################## ###########################

    ####### Compiler, tools and options

    CC = gcc
    CXX = g++
    DEFINES = -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_NEEDS_QMAIN -DQT_DLL -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT
    CFLAGS = -O2 -Wall $(DEFINES)
    CXXFLAGS = -O2 -frtti -fexceptions -mthreads -Wall $(DEFINES)
    INCPATH = -I"..\..\..\Qt\4.3.0\include\QtCore" -I"..\..\..\Qt\4.3.0\include\QtCore" -I"..\..\..\Qt\4.3.0\include\QtNetwork" -I"..\..\..\Qt\4.3.0\include\QtNetwork" -I"..\..\..\Qt\4.3.0\include\QtGui" -I"..\..\..\Qt\4.3.0\include\QtGui" -I"..\..\..\Qt\4.3.0\include" -I"..\common" -I"..\common\libpurple\include" -I"..\common\glib\include" -I"..\common\glib\include\glib" -I"..\common\glib\include\gmodule" -I"..\common\glib\include\gobject" -I"..\..\..\Qt\4.3.0\include\ActiveQt" -I"release" -I"." -I"..\..\..\Qt\4.3.0\mkspecs\win32-g++"
    LINK = g++
    LFLAGS = -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -Wl,-s -Wl,-subsystem,windows -mthreads -Wl
    LIBS = -L"c:\dev\Qt\4.3.0\lib" -lmingw32 -lqtmain release\ZeMessenger_res.o -L../common/libpurple/lib -llibpurple -L../common/glib/lib -lglib-2.0 -lQtGui4 -lQtNetwork4 -lQtCore4
    QMAKE = c:\Dev\Qt\4.3.0\bin\qmake.exe
    IDC = c:\dev\Qt\4.3.0\bin\idc.exe
    IDL = midl
    ZIP = zip -r -9
    DEF_FILE =
    RES_FILE = release\ZeMessenger_res.o
    COPY = copy /y
    COPY_FILE = $(COPY)
    COPY_DIR = xcopy /s /q /y /i
    DEL_FILE = del
    DEL_DIR = rmdir
    MOVE = move
    CHK_DIR_EXISTS= if not exist
    MKDIR = mkdir
    INSTALL_FILE = $(COPY_FILE)
    INSTALL_PROGRAM = $(COPY_FILE)
    INSTALL_DIR = $(COPY_DIR)
    I'm compiling using mingw Gcc on windows.

    For some reason it won't work when launched on a machine where QT isn't installed.
    Is there any special flag to specify to get a fully standalone .exe ?

    Thanks.

    Mr Arnaud.
    Last edited by jacek; 24th July 2007 at 01:17. Reason: changed [code] to [quote]

  2. #2
    Join Date
    Jan 2006
    Location
    travelling
    Posts
    1,116
    Thanks
    8
    Thanked 127 Times in 121 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: standalone Qt .Exe

    You need to recompile Qt as static libraries and then to link your program against those static libs rather than against dlls that come by default... This is a tedious way to go but the only one if you neither want to distribute dlls along your exe nor to force end users to have Qt installed...
    Current Qt projects : QCodeEdit, RotiDeCode

  3. #3
    Join Date
    Aug 2006
    Location
    The Netherlands
    Posts
    64
    Thanks
    6
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: standalone Qt .Exe


  4. The following user says thank you to Teuniz for this useful post:

    bunjee (24th July 2007)

  5. #4
    Join Date
    Jul 2007
    Posts
    27
    Thanks
    4
    Thanked 1 Time in 1 Post

    Default Re: standalone Qt .Exe

    Hello,

    It's actual for other platforms?
    For example MAC OS X and Linux.
    Excuse me for English, I from Russia

  6. #5
    Join Date
    Aug 2006
    Location
    The Netherlands
    Posts
    64
    Thanks
    6
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: standalone Qt .Exe

    Quote Originally Posted by ufo-vl View Post
    Hello,

    It's actual for other platforms?
    For example MAC OS X and Linux.
    I never tried the Mac, but the wiki for building static on Linux is ok,
    I use that procedure every time when I install a newer version of Qt.

    http://wiki.qtcentre.org/index.php?t...ic_Qt_on_Linux

  7. #6
    Join Date
    Jul 2007
    Posts
    27
    Thanks
    4
    Thanked 1 Time in 1 Post

    Default Re: standalone Qt .Exe

    thanks for your message :-)
    Excuse me for English, I from Russia

Similar Threads

  1. how to make a stand alone .exe with VS
    By Masih in forum General Programming
    Replies: 1
    Last Post: 20th May 2007, 07:05
  2. How to create a standalone executable?
    By Ashish in forum Qt Programming
    Replies: 1
    Last Post: 25th January 2007, 15:04
  3. a C .exe doesn't read writeToStdin
    By Shlainn in forum General Programming
    Replies: 3
    Last Post: 20th September 2006, 10:51
  4. Creating a STANDALONE aplication
    By Alienxs in forum KDE Forum
    Replies: 4
    Last Post: 17th August 2006, 16:02

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.