Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. [solved] QT Creator 5.0.2 static build

[solved] QT Creator 5.0.2 static build

Scheduled Pinned Locked Moved Installation and Deployment
30 Posts 2 Posters 31.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • QT-static-prgmQ Offline
    QT-static-prgmQ Offline
    QT-static-prgm
    wrote on last edited by
    #18

    thanks for the link to the debug Class. That's really new for me.

    Normaly i debugg with couts :D

    the problem is, that this programm i wanted to be static has no errors.

    because it's a complete clean new QT applicattion.
    just made
    file>new>qt c++ application>next>next......
    added CONFIG += static in the .pro file, build. and that's it. the building toke a very long time, but there where no errors.

    1 Reply Last reply
    0
    • K Offline
      K Offline
      koahnig
      wrote on last edited by
      #19

      BTW it is Qt. QT stands for QuickTime.

      Oh, you got a "hello world" test application only. Or is it more?
      You are writing of a long compile time. What do you mean with long?

      I would assume that the problem is with the compile settings. A mixture of the "kit/tool chain". I doubt that just adding "static" to the .pro will do the job.

      To use qdebug I can really recommend. I used Qt already for a couple of years until I have started with qDebug. It looked cumbersome and why should you use when cout and cerr is available. However, together with Qt creator it makes sense and also you can more easily redirect the output stuff (e.g. to a file or a socket).

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      0
      • QT-static-prgmQ Offline
        QT-static-prgmQ Offline
        QT-static-prgm
        wrote on last edited by
        #20

        it's even less than a hello world. its an empty window that should apear.

        with long time i mean it seams to me to be minuts, but i think in real it was a bout 30 sec. for complex programms i made without static let'a take an Image Filter prgm it was just a few sec.

        i'll have a look at my test prgm in the afternoon. i have no pc here at the moment.

        1 Reply Last reply
        0
        • QT-static-prgmQ Offline
          QT-static-prgmQ Offline
          QT-static-prgm
          wrote on last edited by
          #21

          ok i just retest.

          file>new>qtapplication
          Kits:Desktop and desktop static
          Desktop, without static, works fine.
          Desktop with static, builds fine, but crashes.

          @#include "mainwindow.h"
          #include <QApplication>

          int main(int argc, char *argv[])
          {
          QApplication a(argc, argv);
          MainWindow w;
          w.show();

          return a.exec();
          }
          @

          @#include "mainwindow.h"
          #include "ui_mainwindow.h"

          MainWindow::MainWindow(QWidget *parent) :
          QMainWindow(parent),
          ui(new Ui::MainWindow)
          {
          ui->setupUi(this);
          }

          MainWindow::~MainWindow()
          {
          delete ui;
          }@

          you see it's a normal clean new Application.
          Also in the pro file i changed nothing.

          When debugging i get the error

          bq. Der Prozess wurde nach Erhalt eines Signals vom Betriebssystem angehalten
          Name des Signals: SIGSEGV
          Bedeutung: Segmentation fault

          Free translated:

          bq. The Prozess was stopped after receive a signal from operatingsystem
          Name of the signal: SIGSEGV
          Meaning: Segmentation fault

          So a friend got this a while ago, when using a pointer showing on a memory that was not from the Application. But this works without static and is a clean new App.
          I really hope someone can help me

          The debugger stopps showing me a file named qatomic_i386.h
          never heard something about this.
          I toke the time it takes to build:
          static debugg: 20 sec
          static release : < 10sec
          normal debugg: < 5sec
          normal release: < 5sec

          1 Reply Last reply
          0
          • K Offline
            K Offline
            koahnig
            wrote on last edited by
            #22

            I assume you are using Qt creator for creating your app.

            What do you change when switching from dynamic to static build?

            The differences there are essential. My guess is that the compilation of the static app doesn't use a consistent memory model.

            In creator go to "Options"->"Build&Run" under the Tabs "Kits" and "Qt versions" you find what you have installed and accessible.
            On the left side of creator under "Projects" ->"Build&Run" you can find the actual kits used for your build. With manage kits, you have a link to the options menu.
            In the "Projects" menu you can switch between different setups.

            When switching setups, I found it helpful to rerun qmake from creator. This makes sure that you use the settings you see. For your small project it does not matter anyhow and it saves a lot of headaches. Use also shadow build.

            Probably you should post "part" of your error messages as displayed.

            PS: I am to lazy to translate the menu entries back to German. I prefer the English terms and have switched the language of creator a long time ago. ;-)

            Vote the answer(s) that helped you to solve your issue(s)

            1 Reply Last reply
            0
            • QT-static-prgmQ Offline
              QT-static-prgmQ Offline
              QT-static-prgm
              wrote on last edited by
              #23

              Yes. I have the Creator 5.0.2. There i made a new Project.
              File>new>Qt-Gui-Application
              Name: test
              Kit:
              Desktop Qt 5.0.2 MinGW 32bit
              Desktop Qt4.8.4 (Qt_static)

              Options>..>Qt Versions give me a ! at the Qt 4.8.4 (Qt_static) version.
              The details say Hilfskomponeten: keine verfügbar
              and Es ist kein qmlviewer installiert

              Options...>Kits There is also a ! at the static Kit.
              The Message is Warnung: Der Compiler ... erstellt möglicherweise keinen mit der Qt Version ... kompatiblen Code.

              So maybe it's because i use Qt 5.0.2 Creator and Qt 4.8.4 for static??

              1 Reply Last reply
              0
              • QT-static-prgmQ Offline
                QT-static-prgmQ Offline
                QT-static-prgm
                wrote on last edited by
                #24

                YEAH!!!!!
                It works thank you a lot.

                The Problem was i cloned the Kit. And so it toke the minGW from Qt. I now deleted it and made a new one and choosed the MinGW in my C:\MinGW direction. I installed a while ago for Eclipse.

                And now it works :D

                I have just a small problem. I one Programm i made i use try and catch. and for some reason the compiler give me the error
                exception handling disabled, use -fexceptions to enable
                What does it mean? Can't i use try catch for static release?? for dynamic it works.
                Or do i only need a option for compiling??

                1 Reply Last reply
                0
                • K Offline
                  K Offline
                  koahnig
                  wrote on last edited by
                  #25

                  Congratulations!! :D

                  Just for clarification. There is no Qt creator version 5... out yet, ;-)
                  What you have installed are the Qt libs version 5.0.2 together with Qt creator version 2.7 something.
                  Qt creator is an IDE using also Qt libs. However, it may be used with different Qt lib versions.

                  With the exceptions I am not sure right away.
                  You need to check MinGW docs if the switch has to be used throughout all libs. IIRC this is not a requirement, but you should better check.

                  If it is an requirement than you need to recompile Qt libs. This implies that Qt libs can be compiled with exceptions switched on.

                  I cannot imagine that there should be a problem, because it would be too common.
                  You would need to set the compile switch in your .pro. Checkout the" qmake documentation":http://qt-project.org/doc/qt-5.0/qtdoc/qmake-variable-reference.html for more details. Checkout the QMAKE_CFLAGS_... and QMAKE_CXXFLAGS...

                  Vote the answer(s) that helped you to solve your issue(s)

                  1 Reply Last reply
                  0
                  • QT-static-prgmQ Offline
                    QT-static-prgmQ Offline
                    QT-static-prgm
                    wrote on last edited by
                    #26

                    Ok.

                    just saw there is an other problem. When there is a unused variable. it doesn't work eighter.

                    The only problem, when using clickable lables the compiler say unsused, but it's is used.

                    can it be that the option -no-exceptions is the problem??

                    ==EDIT==

                    ok forget it. it works :D

                    but how can i make the compiler using öäü...??
                    with the dynamic it wörks, now i get a A with an ~ over it for a Ö.

                    1 Reply Last reply
                    0
                    • K Offline
                      K Offline
                      koahnig
                      wrote on last edited by
                      #27

                      The Umlaute is more a character set problem, I believe.

                      Qt has "QLocale":http://qt-project.org/doc/qt-4.8/qlocale.html for this. However, that stuff is completely outside of my experience.

                      Vote the answer(s) that helped you to solve your issue(s)

                      1 Reply Last reply
                      0
                      • QT-static-prgmQ Offline
                        QT-static-prgmQ Offline
                        QT-static-prgm
                        wrote on last edited by
                        #28

                        With QLocale it works.

                        i made a thread here http://qt-project.org/forums/viewthread/29429/
                        how i get Qt static working.

                        Just noticed, that Qt now didn't find the
                        #include <Q...>
                        for dynamic :D but i don't care i like static more.

                        1 Reply Last reply
                        0
                        • K Offline
                          K Offline
                          koahnig
                          wrote on last edited by
                          #29

                          Using static Qt libs or static libs in general has certainly advantages.
                          However as noted already right at the beginning:
                          [quote author="koahnig" date="1372231046"]
                          First you need to make your own static Qt libs. However, you need to be aware of the license issues when you like to distribute your application.
                          [/quote]

                          "Here is the link to the license options":http://qt-project.org/products/licensing

                          Vote the answer(s) that helped you to solve your issue(s)

                          1 Reply Last reply
                          0
                          • QT-static-prgmQ Offline
                            QT-static-prgmQ Offline
                            QT-static-prgm
                            wrote on last edited by
                            #30

                            Jep i know. And at the moment i'm not thinking of doing a non opensource prgm. But the problem was only with one programm. don't know why. an other programm with QApplication header works.

                            1 Reply Last reply
                            0

                            • Login

                            • Login or register to search.
                            • First post
                              Last post
                            0
                            • Categories
                            • Recent
                            • Tags
                            • Popular
                            • Users
                            • Groups
                            • Search
                            • Get Qt Extensions
                            • Unsolved