I am creating a Webots project on OSX, where I am including the following:
#include <core/MainApplication.hpp>
I get error
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.
All contnet of /Applications/Webots/webots.app/Contents/Frameworks/QtWidgets.framework/Headers/QApplication:
#include "qapplication.h"
- QApplication file content is too short. Also it seems like I cannot find qapplication.h on the file system, is that normal?
- Would it be more sensible to use local installation of Qt framework than the one that comes with Webots? How do I change the .pro file then to link to local installation of Qt rather than to
/Applications/Webots/resources/projects/default/libraries/qt_utils
My make file:
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: I have discovered that when I try to run make in the folder: /Applications/Webots/resources/projects/default/libraries/qt_utils I get many errors (among many others), such as:
/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 facts, these files are indeed missing from the Webots qt_utils