Hallo zusammen,
nachdem ich die Hürden des Crosscompilierens geschafft habe, habe ich meine neue Umgebung in den QT-Creator konfiguriert.
Gerät PI4, als tools => cross-pi-gcc-10.2.0-2
QT-Version 5.15.2
Wenn ich mein Projekt compilieren möchte erhalte ich diesen Fehler:
/home/Salva/rpi4-qt/tools/cross-pi-gcc-10.2.0-2/arm-linux-gnueabihf/include/c++/10.2.0/ext/concurrence.h:122: Fehler: ‘__PTHREAD_MUTEX_INITIALIZER’ was not declared in this scope; did you mean ‘PTHREAD_MUTEX_INITIALIZER’?
In file included from /home/Salva/rpi4-qt/tools/cross-pi-gcc-10.2.0-2/arm-linux-gnueabihf/include/c++/10.2.0/arm-linux-gnueabihf/bits/gthr-default.h:35,
from /home/Salva/rpi4-qt/tools/cross-pi-gcc-10.2.0-2/arm-linux-gnueabihf/include/c++/10.2.0/arm-linux-gnueabihf/bits/gthr.h:148,
from /home/Salva/rpi4-qt/tools/cross-pi-gcc-10.2.0-2/arm-linux-gnueabihf/include/c++/10.2.0/ext/atomicity.h:35,
from /home/Salva/rpi4-qt/tools/cross-pi-gcc-10.2.0-2/arm-linux-gnueabihf/include/c++/10.2.0/bits/basic_string.h:39,
from /home/Salva/rpi4-qt/tools/cross-pi-gcc-10.2.0-2/arm-linux-gnueabihf/include/c++/10.2.0/string:55,
from ../../../rpi4-qt/qt5.15/include/QtCore/qbytearray.h:52,
from ../../../rpi4-qt/qt5.15/include/QtCore/qstring.h:50,
from ../../../rpi4-qt/qt5.15/include/QtCore/qcoreapplication.h:44,
from ../../../rpi4-qt/qt5.15/include/QtCore/QCoreApplication:1,
from ../H_S_Kartenleser/main.cpp:1:
/home/Salva/rpi4-qt/tools/cross-pi-gcc-10.2.0-2/arm-linux-gnueabihf/include/c++/10.2.0/ext/concurrence.h:122:34: error: ‘__PTHREAD_MUTEX_INITIALIZER’ was not declared in this scope; did you mean ‘PTHREAD_MUTEX_INITIALIZER’?
122 | __gthread_mutex_t _M_mutex = __GTHREAD_MUTEX_INIT;
| ^~~~~~~~~~~~~~~~~~~~
Hat jemand eine Idee was hier falsch sein könnte?
Das Projekt selbst lässt sich auf für einen PI3 als tools => cross-pi-gcc-8..0-2
QT-Version 5.15.2 ohne Probleme compilieren.
Danke
QT-Creator Error __PTHREAD_MUTEX_INITIALIZER
Re: QT-Creator Error __PTHREAD_MUTEX_INITIALIZER
Hallo zusammen,
die Ursache war ein falscher include Pfad in meiner Projekt-Datei.
Ich habe den Pfad auf das korrekte Sysroot angepasst und dann hat es funkrioniert.
Vielleicht hilft es jemand.
Grüße
Salvator
die Ursache war ein falscher include Pfad in meiner Projekt-Datei.
Ich habe den Pfad auf das korrekte Sysroot angepasst und dann hat es funkrioniert.
Vielleicht hilft es jemand.
Grüße
Salvator