Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. QT_NO_THREAD
Forum Updated to NodeBB v4.3 + New Features

QT_NO_THREAD

Scheduled Pinned Locked Moved Mobile and Embedded
9 Posts 2 Posters 5.4k Views 1 Watching
  • 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.
  • ? This user is from outside of this forum
    ? This user is from outside of this forum
    Guest
    wrote on 17 Aug 2011, 01:40 last edited by
    #1

    Hi,

    I'm trying to get a non-threaded version of Qt working, but I seem to be having trouble compiling it. When I disable threading support with the QT_NO_THREAD flag, I get compile errors:

    @
    In file included from ../../include/QtCore/private/qthread_p.h:1:0,
    from global/qglobal.cpp:52:
    ../../include/QtCore/private/../../../src/corelib/thread/qthread_p.h: In constructor ‘QThreadPrivate::QThreadPrivate(QThreadData*)’:
    ../../include/QtCore/private/../../../src/corelib/thread/qthread_p.h:172:59: error: invalid use of incomplete type ‘struct QThreadData’
    ../../include/QtCore/../../src/corelib/kernel/qobject.h:306:18: error: forward declaration of ‘struct QThreadData’
    ../../include/QtCore/private/../../../src/corelib/thread/qthread_p.h: In destructor ‘virtual QThreadPrivate::~QThreadPrivate()’:
    ../../include/QtCore/private/../../../src/corelib/thread/qthread_p.h:173:32: warning: possible problem detected in invocation of delete operator:
    ../../include/QtCore/private/../../../src/corelib/thread/qthread_p.h:173:32: warning: invalid use of incomplete type ‘struct QThreadData’
    ../../include/QtCore/../../src/corelib/kernel/qobject.h:306:18: warning: forward declaration of ‘struct QThreadData’
    ../../include/QtCore/private/../../../src/corelib/thread/qthread_p.h:173:32: note: neither the destructor nor the class-specific operator delete will be called, even if they are declared when the class is defined.
    make[1]: *** [.obj/debug-shared-emb-generic/qglobal.o] Error 1
    make[1]: Leaving directory `/home/****/qt-everywhere-opensource-src-4.7.0/src/corelib'
    make: *** [sub-corelib-make_default-ordered] Error 2
    @

    I'm working of Qt for Embedded Linux 4.7.0. This is on Ubuntu 11.04.

    Thanks.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SimonL
      wrote on 17 Aug 2011, 04:17 last edited by
      #2

      I didn't know it was still possible i saw this on it in google maybe it will help http://doc.qt.nokia.com/main-snapshot/fine-tuning-features.html

      1 Reply Last reply
      0
      • ? This user is from outside of this forum
        ? This user is from outside of this forum
        Guest
        wrote on 17 Aug 2011, 19:09 last edited by
        #3

        Yes, actually that's where I got the idea of using the QT_NO_THREAD flag.

        1 Reply Last reply
        0
        • G Offline
          G Offline
          goetz
          wrote on 17 Aug 2011, 22:18 last edited by
          #4

          That flag is for building Qt.

          If you want to strip threading support, you will have to rebuild your Qt libraries. You can not strip it by just defining QT_NO_THREAD.

          http://www.catb.org/~esr/faqs/smart-questions.html

          1 Reply Last reply
          0
          • ? This user is from outside of this forum
            ? This user is from outside of this forum
            Guest
            wrote on 17 Aug 2011, 22:24 last edited by
            #5

            [quote author="Volker" date="1313619534"]That flag is for building Qt.

            If you want to strip threading support, you will have to rebuild your Qt libraries. You can not strip it by just defining QT_NO_THREAD.[/quote]

            This is what I'm doing. I'm building Qt for Embedded Linux 4.7.0. When I try to disable threading support while building the Qt libraries (by defining the QT_NO_THREAD flag), I get this error.

            1 Reply Last reply
            0
            • G Offline
              G Offline
              goetz
              wrote on 17 Aug 2011, 22:42 last edited by
              #6

              src/corelib/global/qfeatures.txt does not list QT_NO_THREAD as a supported define. I would guess, this is a remainder of the old Qt 3 days, where threading was optional. It could well be that threading is no longer optional but required in Qt 4.

              http://www.catb.org/~esr/faqs/smart-questions.html

              1 Reply Last reply
              0
              • ? This user is from outside of this forum
                ? This user is from outside of this forum
                Guest
                wrote on 17 Aug 2011, 23:00 last edited by
                #7

                [quote author="Volker" date="1313620932"]src/corelib/global/qfeatures.txt does not list QT_NO_THREAD as a supported define. I would guess, this is a remainder of the old Qt 3 days, where threading was optional. It could well be that threading is no longer optional but required in Qt 4.[/quote]

                This is definitely a possibility, but I'd like to think otherwise. However, src/tools/bootstrap also QT_NO_THREAD as one of its defines. I've looked at the source code, and I reformatted it to get rid of the compiler errors, but now I've come across other compiler errors, so i was wondering if QT_NO_THREAD was really supported.

                1 Reply Last reply
                0
                • G Offline
                  G Offline
                  goetz
                  wrote on 18 Aug 2011, 10:57 last edited by
                  #8

                  In Qt 3 there used to be a switch to turn off threading support in Qt. This has gone in Qt 4.

                  bootstrap is a different beast, it is used to build Qt libs (i.e. to make a static (in the sense of no dynamic linking to Qt libs) version of qmake etc.).

                  I'm sorry, but I'm pretty sure that Qt 4 cannot be built without thread support. It is used all throughout QCoreApplication for example.

                  http://www.catb.org/~esr/faqs/smart-questions.html

                  1 Reply Last reply
                  0
                  • ? This user is from outside of this forum
                    ? This user is from outside of this forum
                    Guest
                    wrote on 19 Aug 2011, 19:17 last edited by
                    #9

                    [quote author="Volker" date="1313665046"]In Qt 3 there used to be a switch to turn off threading support in Qt. This has gone in Qt 4.

                    bootstrap is a different beast, it is used to build Qt libs (i.e. to make a static (in the sense of no dynamic linking to Qt libs) version of qmake etc.).

                    I'm sorry, but I'm pretty sure that Qt 4 cannot be built without thread support. It is used all throughout QCoreApplication for example.[/quote]

                    Okay. Thanks for your help.

                    1 Reply Last reply
                    0

                    1/9

                    17 Aug 2011, 01:40

                    • Login

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