在make期间执行的命令在命令提示符下不起作用

时间:2015-04-25 12:12:30

标签: c++ qt

无法发布图片,因此这里是编译源时的QT输出,例如:

14:04:57: Starting: "C:\Qt\Tools\mingw491_32\bin\mingw32-make.exe" 
C:/Qt/Tools/mingw491_32/bin/mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory 'C:/Users/daniel/SkyDrive/Files/Development/C++/ETH I/CUBLI Choreographer/build-CUBLIchoreographer-Desktop_Qt_5_4_1_MinGW_32bit-Debug'
g++ -c -pipe -fno-keep-inline-dllexport -g -frtti -Wall -Wextra -fexceptions -mthreads -DUNICODE -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_SERIALPORT_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -I'../CUBLIchoreographer' -I'.' -I'C:/Qt/5.4/mingw491_32/include' -I'C:/Qt/5.4/mingw491_32/include/QtWidgets' -I'C:/Qt/5.4/mingw491_32/include/QtGui' -I'C:/Qt/5.4/mingw491_32/include/QtSerialPort' -I'C:/Qt/5.4/mingw491_32/include/QtCore' -I'debug' -I'.' -I'C:/Qt/5.4/mingw491_32/mkspecs/win32-g++'  -o debug/mainwindow.o ../CUBLIchoreographer/mainwindow.cpp
../CUBLIchoreographer/mainwindow.cpp: In member function 'int MainWindow::addTimeline()':
../CUBLIchoreographer/mainwindow.cpp:34:1: warning: no return statement in function returning non-void [-Wreturn-type]
 }
 ^

以上是成功的,但是当将相关命令复制粘贴到cmd时,这就是结果:

    Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.

C:\Users\daniel>workbench C++

C:\Users\daniel\SkyDrive\Files\Development\C++>cd "ETH I"

C:\Users\daniel\SkyDrive\Files\Development\C++\ETH I>cd "CUBLI Choreographer"

C:\Users\daniel\SkyDrive\Files\Development\C++\ETH I\CUBLI Choreographer>cd build-CUBLIchoreographer-Desktop_Qt_5_4_1_MinGW_32bit-Debug

C:\Users\daniel\SkyDrive\Files\Development\C++\ETH I\CUBLI Choreographer\build-CUBLIchoreographer-Desktop_Qt_5_4_1_MinGW_32bit-Debug>g++ -c -pipe -fno-ke
ep-inline-dllexport -g -frtti -Wall -Wextra -fexceptions -mthreads -DUNICODE -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_SERIALPORT_LIB -DQT_CORE_LIB -DQT_NEEDS_Q
MAIN -I'../CUBLIchoreographer' -I'.' -I'C:/Qt/5.4/mingw491_32/include' -I'C:/Qt/5.4/mingw491_32/include/QtWidgets' -I'C:/Qt/5.4/mingw491_32/include/QtGui
' -I'C:/Qt/5.4/mingw491_32/include/QtSerialPort' -I'C:/Qt/5.4/mingw491_32/include/QtCore' -I'debug' -I'.' -I'C:/Qt/5.4/mingw491_32/mkspecs/win32-g++'  -o
 debug/mainwindow.o ../CUBLIchoreographer/mainwindow.cpp
In file included from ../CUBLIchoreographer/mainwindow.cpp:1:0:
../CUBLIchoreographer/mainwindow.h:4:23: fatal error: QMainWindow: No such file or directory
 #include <QMainWindow>
                       ^
compilation terminated.

(我已经检查了,QMainWindow类出现在'C:/Qt/5.4/mingw491_32/include/QtWidgets'中,这是包含的一部分)

我提前感谢,我觉得很傻。

注意:我遇到这个问题,因为我需要知道vim中YouCompleteMe插件需要哪些编译标志。复制上述命令时,同样无法识别QMainWindow类。

0 个答案:

没有答案