Results 1 to 10 of 10

Thread: qt creator configuration

  1. #1
    Join Date
    Jul 2009
    Posts
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default qt creator configuration

    Okay, so I got Qt Creator yesterday on windows XP. I downloaded the qt-sdk-win-opensource-2009.03.exe and installed then. Then I got the official book "C++ GUI Programming with Qt4." I was following along one of the first few examples, some very easy stuff. This example was a window that has a button and when you click the button the app quits:

    Qt Code:
    1. #include <QApplication>
    2. #include <QPushButton>
    3.  
    4. int main(int argc, char *argv[])
    5. {
    6. QApplication app(argc, argv);
    7. QPushButton *button = new QPushButton("Quit");
    8. QObject::connect(button, SIGNAL(clicked()), &app, SLOT(quit()));
    9. button->show();
    10. return app.exec();
    11. }
    To copy to clipboard, switch view to plain text mode 

    So I was really excited to show my friend. I sent him the executable and then he got an error message saying he needed mingwm10.dll. So I added that, and then he needed QtGui4.dll and QtCore4.dll. And so my application, which just shows a button, turned out to be over 13 MB. I'm wondering, is there a way to configure Qt Creator, so that when I build in release mode (I hope that's something I'm not making up), it just creates a standalone executable that doesn't require the .dlls to be with it? I was reading lots of stuff online, but it all confuses me, because I'm a noob. I think the solution to my problem has something to do with static building, but I'm not quite sure, and I couldn't understand any of the articles regarding that. I need some serious walk-through help. Thank you for your time and patience!

  2. #2
    Join Date
    Jun 2008
    Posts
    14
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qt creator configuration

    you r right .. you have to link against a static build of qt
    so u have to rebuild qt see configure help for details

  3. #3
    Join Date
    Jul 2009
    Posts
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qt creator configuration

    thanks for the quick reply! how do I access configure help? (again total noob)

  4. #4
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: qt creator configuration

    look inside the assistant, or pressing F1 inside the creator. Then use the search function inside and search for "Deploying an Application on Windows". Further options for the building you can receive on your command prompt in the source directory of qt by typing configure.exe -help.

  5. #5
    Join Date
    Jul 2009
    Posts
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qt creator configuration

    So I tried to build statically by typing into the command prompt:

    cd C:\...pathtoQt\
    configure -static
    mingw32-make sub-src
    The configure worked, but then when I went to build, it ended in error. I got this at the end:
    mingw32-make[2]: *** [..\..\..\bin\moc.exe] Error 1
    mingw32-make[2]: Leaving directory `C:/Qt/4.5.2/src/tools/moc'
    mingw32-make[1]: *** releasing Error 2
    mingw32-make[1]: Leaving directory `C:/Qt/4.5.2/src/tools/moc'
    mingw32-make: *** [sub-moc-sub_src_target_ordered] Error 2
    Any ideas what I can do to solve this problem?

  6. #6
    Join Date
    Jul 2008
    Location
    Germany
    Posts
    503
    Thanks
    11
    Thanked 76 Times in 74 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: qt creator configuration

    You cut the important lines

    Post the lines above the lines in your second code block because this block just shows the cleanup of make.

    Ginsengelf

  7. #7
    Join Date
    Jul 2009
    Posts
    42
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Windows

    Question Re: qt creator configuration

    Hi ... i am having some Problems creating my staticly linked app...

    I ran configure -static and got the following:

    ...
    Environment:
    INCLUDE=
    Unset
    LIB=
    Unset
    PATH=
    ...
    D:\MinGW\Bin
    D:\msys\1.0\bin
    ...

    You are licensed to use this software under the terms of the GNU GPL version 3.Y
    ou are licensed to use this software under the terms of the Lesser GNU LGPL vers
    ion 2.1.
    See D:/Qt/2009.02/qt3

    or D:/Qt/2009.02/qtL

    Configuration:
    dist-config
    large-config
    medium-config
    minimal-config
    small-config
    full-config
    build_all
    debug
    Qt Configuration:
    release
    debug
    zlib
    gif
    png
    accessibility
    qt3support
    opengl
    ipv6
    scripttools
    xmlpatterns
    webkit
    svg
    minimal-config
    small-config
    medium-config
    large-config
    full-config

    QMAKESPEC...................win32-g++ (detected)
    Architecture................windows
    Maketool....................mingw32-make
    Debug symbols...............yes
    Accessibility support.......yes
    STL support.................yes
    Exception support...........yes
    RTTI support................yes
    MMX support.................no
    3DNOW support...............no
    SSE support.................no
    SSE2 support................no
    IWMMXT support..............no
    OpenGL support..............yes
    Direct3D support............no
    OpenSSL support.............no
    QtDBus support..............no
    QtXmlPatterns support.......yes
    Phonon support..............no
    WebKit support..............yes
    QtScriptTools support.......yes
    Graphics System.............raster
    Qt3 compatibility...........yes

    Third Party Libraries:
    ZLIB support............qt
    GIF support.............yes
    TIFF support............plugin
    JPEG support............plugin
    PNG support.............qt
    MNG support.............plugin

    Styles:
    Windows.................yes
    Windows XP..............yes
    Windows Vista...........yes
    Plastique...............yes
    Cleanlooks..............yes
    Motif...................yes
    CDE.....................yes
    Windows CE..............no
    Windows Mobile..........no

    Sql Drivers:
    ODBC....................no
    MySQL...................no
    OCI.....................no
    PostgreSQL..............no
    TDS.....................no
    DB2.....................no
    SQLite..................plugin (qt)
    SQLite2.................no
    InterBase...............no

    Sources are in..............D:\Qt\2009.02\qt
    Build is done in............D:\Qt\2009.02\qt
    Install prefix..............D:\Qt\2009.02\qt
    Headers installed to........D:/Qt/2009.02/qt/include
    Libraries installed to......D:/Qt/2009.02/qt/lib
    Plugins installed to........D:/Qt/2009.02/qt/plugins
    Binaries installed to.......D:/Qt/2009.02/qt/bin
    Docs installed to...........D:/Qt/2009.02/qt/doc
    Data installed to...........D:/Qt/2009.02/qt
    Translations installed to...D:/Qt/2009.02/qt/translations
    Examples installed to.......D:/Qt/2009.02/qt/examples
    Demos installed to..........D:/Qt/2009.02/qt/demos

    WARNING: Using static linking will disable the use of plugins.
    Make sure you compile ALL needed modules into the library.
    Creating qmake...
    execute: File or path is not found (mingw32-make)
    execute: File or path is not found (mingw32-make)
    Cleaning qmake failed, return code -1
    after i tryed to run mingw32-make sub-src
    but got this:

    mingw32-make: *** No rule to make target `sub-src'. Stop.
    what am i doing wrong?

  8. #8
    Join Date
    May 2008
    Posts
    155
    Thanked 15 Times in 13 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: qt creator configuration

    Quote Originally Posted by ericV View Post
    Hi ... i am having some Problems creating my staticly linked app...

    I ran configure -static and got the following:



    after i tryed to run mingw32-make sub-src
    but got this:



    what am i doing wrong?
    You need to properly remove all previous build products first.
    The best way to ensure a clean source tree is to build from
    the source package, not the SDK sources (which obviously
    had been configured before shipping).

    At the very least, there should be no .obj files in the qmake
    directory.

  9. #9
    Join Date
    Aug 2009
    Location
    columbus, oh
    Posts
    1
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: qt creator configuration

    EricV and others:

    I am also ATTEMPTING to create an exe from the same compiled-install for windows and have the same problem. I've been at it for days... I'm hoping to tag along and see this thru.

    One thing...
    when we find the solution to creating a true compilation that will work, either with embeded dll or with QT including the dll's in the release folder...

    Can we post once and for all, STEP BY STEP, HOW TO CONFIGURE the QT Libraries?

    Im sure there are hundreds out here with the same problem.

    In the meantime, I'll also keep looking....

  10. #10
    Join Date
    Sep 2009
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qt creator configuration

    I'm also trying to figure this out. For our final apps, we will be using Linux, but for our early prototyping of GUIs I want to be able to easily email a Windows version of the app. Therefore, I installed the windows version of Qt and have build a small app with Creator. As with the folks above, to send my app requires 13MB of dlls!

    OK, I was able to reconfigure and I'm building now (HINT: use the Qt Command Prompt from the Start Menu in order to set up the Qt and MinGW environment correctly!)

    I'm currently trying to rebuild static and we'll see what happens, but by all the descriptions I've seen, I'm worried that doing this reconfigure will cause Creator itself to run as a statically linked application, which is not what I want. Creator should just have a configure option to build your project for either dynamic/static linking.

    Maybe it's really a qmake question for when it sets up library paths and compiler options. If you have both static and dynamic libraries for Qt compiled, you should be able to build either way very easily.

    Corbin

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.