When I try to run my first program in QT I get the followinging error:
当我尝试在QT运行我的第一个程序时,我得到了以下错误:
/untitled1/main.cpp:1:26: fatal error: qapplication.h: No such file or directory #include ^ compilation terminated. make: * [main.o] Error 1 09:38:51: The process "/usr/bin/make" exited with code 2. Error while building/deploying project untitled1 (kit: Desktop) When executing step 'Make' 09:38:52: Elapsed time: 00:01.
/ untitled1 /主要。cpp:1:致命错误:qapplication。h:没有这样的文件或目录# include ^编译终止。:*(主要。错误1:"/usr/bin/make",用代码2退出。在执行步骤“Make”的过程中,在构建/部署项目时出错(kit: Desktop)。
Please help me.
请帮助我。
1 个解决方案
#1
2
-
Install Qt Creator from the Ubuntu Software Center (I know from reading your other question that you are using Ubuntu).
从Ubuntu软件中心安装Qt创建者(我知道你正在使用Ubuntu)。
-
Visit the Qt for beginners — Hello World! tutorial website.
访问Qt为初学者-你好世界!教程的网站。
-
Follow the steps in the Qt for beginners — Hello World! tutorial.
Tip: Make a new folder in your /home directory for your Qt Projects before you start the tutorial. Call the new folder QtProjects or whatever name you like.跟随Qt的步骤,为初学者-你好世界!教程。提示:在开始本教程之前,在您/home目录中为Qt项目创建一个新文件夹。调用新的文件夹QtProjects或任何您喜欢的名称。
-
The output of the tutorial Hello World! application will appear in a separate popup window after you compile and run it.
教程Hello World的输出!在编译并运行应用程序后,应用程序将出现在一个单独的弹出窗口中。
#1
2
-
Install Qt Creator from the Ubuntu Software Center (I know from reading your other question that you are using Ubuntu).
从Ubuntu软件中心安装Qt创建者(我知道你正在使用Ubuntu)。
-
Visit the Qt for beginners — Hello World! tutorial website.
访问Qt为初学者-你好世界!教程的网站。
-
Follow the steps in the Qt for beginners — Hello World! tutorial.
Tip: Make a new folder in your /home directory for your Qt Projects before you start the tutorial. Call the new folder QtProjects or whatever name you like.跟随Qt的步骤,为初学者-你好世界!教程。提示:在开始本教程之前,在您/home目录中为Qt项目创建一个新文件夹。调用新的文件夹QtProjects或任何您喜欢的名称。
-
The output of the tutorial Hello World! application will appear in a separate popup window after you compile and run it.
教程Hello World的输出!在编译并运行应用程序后,应用程序将出现在一个单独的弹出窗口中。