Table of Contents
Sometimes your computer may return an error code indicating an application error. This error can be caused by a variety of reasons.
Updated
At the beginning, these QApplication: error no such file or directory
indicate that your compiler cannot display this header. This is not related to the linking process as you mentioned in the question.
-I
(uppercase i flag) is probably used to specify the web include (header) directory (what you should do), and the -L
flag – used when you need to specify the library directory. The -l
(lowercase L) flag is used to link the best application to the specified library.
But you can take advantage of Qt: in inYour Qt has a build system called qmake that makes it easy to sell things. For example, when I need to compile main.cpp, I create a new main.pro file. For educational purposes, let’s assume the source code is a simple project that uses only QApplication
and QDeclarativeView
. Applicable .pro file:
MODEL + = applicationQT + = UI declarationSOURCES + = main.cpp
Then you call qmake
in that directory to create a makefile that will be used to compile your application, and finally you run make
to do the job that will be determined.
g ++ -pipe -c -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_DECLARATIVE_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I / opt / qt_kI / opt / qk-q47 QtDeclarative -I / opt / qt_47x / include -I / usr / X11R6 / include -I. -o main.o main.cppg ++ -Wl, -O1 -Wl, -rpath, / opt / qt_47x / lib -i main main.o -L / opt / qt_47x / lib -L / usr / X11R6 / lib -lQtDeclarative -L / opt / qt_47x / lib -lQtScript -L / usr / X11R6 / lib -lqtsvg -lQtSql -lQtXmlPatterns -lQtNetwork -lQtGui -lQtCore -lpthread
Updated
Are you tired of your computer running slow? Annoyed by frustrating error messages? ASR Pro is the solution for you! Our recommended tool will quickly diagnose and repair Windows issues while dramatically increasing system performance. So don't wait any longer, download ASR Pro today!
Add QT + = Widgets
to your .maven file and fix this issue.
@jsulm Hello, I practically have a problem similar to at @Mijaz. I am trying to use Qt 5.11 to build an STM32MP157c-DK2 development board. I need the images to be successfully uploaded to the board from a qml file, but my cpp docs are full of errors, including ‘Use in undeclared id’ QCoreApplication ‘. I used #include
#include #include #include #include #include #include #include int main (int argc, char * argv []) QCoreApplication :: setAttribute (Qt :: AA_EnableHighDpiScaling); QGuiApplication-App (argc, argv); QQmlApplicationEngine engine; const QUrl url (QStringLiteral ("qrc: /main.qml")); QObject :: connect (& engine, & QQmlApplicationEngine :: createdObject, & application, [url] (QObject * obj, const QUrl & objUrl) when (! obj && URL == objUrl) QCoreApplication :: output (-1); , Qt :: QueuedConnection); motor.load (url); app.exec () generate;
QT + = basic GUI for quick widgetsCONFIGURATION + = qmltypes c ++ 11 qt# The next state will cause your compiler to issue warnings if you use# any deprecated Qt functions (exact warnings# depends on your compiler). Read the documentation for# API mustacheplate because of how to carry your code out of it.SET QT_DEPRECATED_WARNINGS# + = You can also opt out of compiling your policy if it allows you to create legacy APIs.# Uncomment the following line# can also be clicked to disable deprecated APIs, just to make sure you have a specific version of Qt.#DEFINES QT_DISABLE_DEPRECATED_BEFORE = 0x060000 + = # disables all APIs that were deprecated prior to Qt 6.0.0SOURCES + = n main.cppRESOURCES + = qml.qrc# Additional import path required to resolve Qt QML modules in the creator's code modelQML_IMPORT_PATH =# Recommended additional import path for troubleshooting QML modules for Qt Quick Designer onlyQML_DESIGNER_IMPORT_PATH =# Standard deployment rules.#qnx: target.path = / tmp / $$ TARGET / bin#else: unix :! android: target.path means / opt / $$ TARGET / bin#! isEmpty (target.path): INSTALLED + = targetTARGET = stm32mp1Test target.files = stm32mp1Test target.path = / home / rootESTABLISHED + = target
[62%] Targeted joystick check[62%] Automatic MOC for accurate iCubGui[62%] Target created by iCubGui_autogen[62%] Create a CXX object src / tools / iCubGui / src / CMakeFiles / iCubGui.dir / animationview.cpp.oThe file containing /Users/lrapetti/robotology-superbuild/robotology/ICUB/src/tools/iCubGui/src/animationview.cpp:35:In the file from /Users/lrapetti/robotology-superbuild/robotology/ICUB/src/tools/iCubGui/src/animationview.h:25:In the file /Users/lrapetti/robotology-superbuild/robotology/ICUB/src/tools/iCubGui/src/bvh.h:45:/Users/lrapetti/robotology-superbuild/robotology/ICUB/src/tools/iCubGui/src/bvhnode.h:26:10: Fatal error: QApplication.h file no longer found#include ^ ~~~~~~~~~~~~~~~1 error has occurred.make [5]: *** [src / tools / iCubGui / src / CMakeFiles / iCubGui.dir / animationview.cpp.o] Error 1make [4]: *** [src / tools / iCubGui / src / CMakeFiles / iCubGui.dir / all] Error 2do [3]: *** [all] 2Run [2]: Error *** [robotology / ICUB / CMakeFiles / YCMStamp / ICUB-build] Error 2make [1]: *** [CMakeFiles / ICUB.dir / all] 2Manufacturer: Error *** [all] Error 2
For compilers to find qt, you may need to specify: export LDFLAGS = "- L / usr / local / opt / qt / lib" export CPPFLAGS = "- I / usr / local / opt / qt / include"For pkg-config to find qt, users may need to define: export PKG_CONFIG_PATH = "/ usr / local / opt / qt / lib / pkgconfig"
#include #include int main (int argv, char ** args) QApplication (argv, args); QTextEdit textEdit;textEdit.show (); returns app.exec ();
When you compile a Qt project, an error is thrown -No:
QWidget such file or directory
QApplication – no such file or directory
other.
Speed up your computer today with this simple download.
È Necessario Eliminare Gli Errori Nell’applicazione Dalle Attività
Вы должны устранить ошибки в приложении из задач
U Moet Fouten In De Toepassing Uit Taken Verwijderen
Du Måste Eliminera Fel I Applikationen Från Uppgifter
Debes Eliminar Los Errores En La Aplicación De Las Tareas.
Musisz Wyeliminować Błędy W Aplikacji Z Zadań
Sie Müssen Fehler In Der Anwendung Aus Aufgaben Eliminieren
Vous Devez éliminer Les Erreurs Dans L’application Des Tâches
작업에서 응용 프로그램의 오류를 제거해야 합니다.
Você Deve Eliminar Erros No Aplicativo De Tarefas