2016-05-01 3 views
0

Ich bin ein Webots Projekt auf OSX zu schaffen, in dem ich die folgende bin auch:Webots Qt-Framework-Bibliotheken

#include <core/MainApplication.hpp> 

ich Fehler

In file included from /Applications/Webots/resources/projects/default/libraries/qt_utils/core/MainApplication.hpp:17: /Applications/Webots/webots.app/Contents/Frameworks/QtWidgets.framework/Headers/QApplication:1:10: fatal error: 'qapplication.h' file not found

include "qapplication.h"

1 error generated.

Alle Contnet von/Anwendungen/Webots/webots.app/Contents/Frameworks/QtWidgets.framework/Headers/QApplication:

  1. QApplication Dateiinhalt ist zu kurz. Auch scheint es, als ob ich qapplication.h auf dem Dateisystem nicht finden kann, ist das normal?
  2. Wäre es sinnvoller, die lokale Installation von Qt Framework zu verwenden als die von Webots? Wie kann ich die .proDatei dann ändere eher auf lokale Installation von Qt zu verknüpfen als zu /Applications/Webots/resources/projects/default/libraries/qt_utils

My Make-Datei:

CXX_SOURCES = entry_points.cpp 

QT = core gui 
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 
USE_C_API = true 

QT_UTILS = /Applications/Webots/resources/projects/default/libraries/qt_utils 
INCLUDE = -I"$(QT_UTILS)" 
LIBRARIES = -L"$(QT_UTILS)" -lqt_utils 

space := 
space += 
WEBOTS_HOME_PATH=$(subst $(space),\ ,$(strip $(subst \,/,$(WEBOTS_HOME)))) 
include /Applications/Webots/resources/Makefile.include 

EDIT: ich entdeckt habe, dass, wenn ich versuche, laufen machen im Ordner: /Anwendungen/Webots/resources/Projekte/default/Bibliotheken/qt_utils ich viele Fehler bekommen (unter vielen anderen), wie wie:

/Applications/Webots/webots.app/Contents/Frameworks/QtWidgets.framework/Headers/QWidget:1:10: fatal error: 'qwidget.h' file not found

include "qwidget.h"

... /Applications/Webots/webots.app/Contents/Frameworks/QtCore.framework/Headers/QObject:1:10: fatal error: 'qobject.h' file not found

include "qobject.h"

... /Applications/Webots/webots.app/Contents/Frameworks/QtWidgets.framework/Headers/QApplication:1:10: fatal error: 'qapplication.h' file not found

include "qapplication.h"

In Tatsachen werden diese Dateien in der Tat von den Webots fehlt

Antwort

1

qt_utils ist dies wahrscheinlich wegen dieser Zeile:

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 

Tat QT_MAJOR_VERSION und greaterThan sind nicht Teil das Makefile-System von Webots. Wenn das Modul Qt widgets nicht vorhanden ist, kann qapplication.h nicht gefunden werden (weil es im Modul widgets genau definiert ist). Wie Webots mit Qt 5 seit einer Weile ist, würde ich empfehlen, einfach, um die Qt-Module wie folgt zu definieren:

QT = core gui widgets 
+0

‚qapplication.h' nicht einmal gefunden, wenn ich‘ QT = core GUI-Widgets –

+0

Ist WEBOTS_HOME richtig definiert? https://www.cyberbotics.com/guide/compiling-controllers-in-a-terminal.php – FabienRohrer

+0

Konnten Sie den folgenden Befehl ausführen, um festzustellen, ob qapplication.h in Ihrem System ist? '$ find/Anwendungen/Webots/-name qapplication.h' – FabienRohrer