qt错误: moc: Too many input files specified

来源:互联网 发布:车易拍官网软件下载 编辑:程序博客网 时间:2024/06/08 01:17

在编译PC端的QT文件中没有出现错误,而当我选为编译成arm端的QT文件时,出现了如下的错误
moc: Too many input files specified

Usage: moc [options] 
-o write output to file rather than stdout
-I add dir to the include path for header files
-E preprocess only; do not generate meta object code
-D[=] define macro, with optional definition
-U undefine macro
-i do not generate an #include statement
-p path prefix for included file
-f[] force #include, optional file name
-nw do not display warnings
@ read additional options from file
-v display version of moc
make: *** [moc_bcchat_messagefield.cpp] 错误 1

原因:
由于我的工程是从别的文件夹当中复制过来的,所以编译时的编译文件还是原来文件夹的build-desktop中。查看
Projects->General->Build directory可看到是在原先的文件夹当中而不是在现有的文件夹当。
解决方法:
直接在
Projects->General->Build directory中改成现有的文件夹即可。
如果不行,就另创建新的工程,然后将先前的工程文件添加进去