Q_WS_WIN代表什么?

时间:2016-02-17 18:20:53

标签: c++ makefile cmake qt4

我正在尝试使用Ubuntu 14.04 64bit中的CMake构建一个项目但是在尝试Q_WS_WIN是否存在时CMake总是失败。 Q_WS_WIN是什么意思/代表什么?

以下是错误日志的输出:

Determining if the Q_WS_WIN exist failed with the following output:
Change Dir: /home/software/software_qt/build/CMakeFiles/CMakeTmp

Run Build Command:/usr/bin/make "cmTryCompileExec3778196767/fast"
/usr/bin/make -f CMakeFiles/cmTryCompileExec3778196767.dir/build.make CMakeFiles/cmTryCompileExec3778196767.dir/build
make[1]: Entering directory `/home/software/software_qt/build/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report /home/software/software_qt/build/CMakeFiles/CMakeTmp/CMakeFiles 1
Building CXX object CMakeFiles/cmTryCompileExec3778196767.dir/CheckSymbolExists.cxx.o
/usr/bin/c++    -Wall -Wextra  -I/usr/include/qt4    -o CMakeFiles/cmTryCompileExec3778196767.dir/CheckSymbolExists.cxx.o -c /home/software/software_qt/build/CMakeFiles/CMakeTmp/CheckSymbolExists.cxx
/home/software/software_qt/build/CMakeFiles/CMakeTmp/CheckSymbolExists.cxx: In function ‘int main(int, char**)’:
/home/software/software_qt/build/CMakeFiles/CMakeTmp/CheckSymbolExists.cxx:8:19: error: ‘Q_WS_WIN’ was not declared in this scope
   return ((int*)(&Q_WS_WIN))[argc];
                   ^
make[1]: *** [CMakeFiles/cmTryCompileExec3778196767.dir/CheckSymbolExists.cxx.o] Error 1
make[1]: Leaving directory `/home/software/software_qt/build/CMakeFiles/CMakeTmp'
make: *** [cmTryCompileExec3778196767/fast] Error 2

File /home/software/software_qt/build/CMakeFiles/CMakeTmp/CheckSymbolExists.cxx:
/* */
#include <QtCore/qglobal.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef Q_WS_WIN
  return ((int*)(&Q_WS_WIN))[argc];
#else
  (void)argc;
  return 0;
#endif
}

0 个答案:

没有答案
相关问题