我一直在尝试让 qxt 在 Windows 中使用 MSVC 2010 工作。
我已将 Qt 4.8.4 安装到“D:\Qt\4.8.4”中,并将 qxt 安装到“D:\libqxt”中。我配置qxt如下:
D:\libqxt>configure -prefix D:\libqxt -debug_and_release
然后从 Qt 命令行编译:
D:\libqxt>nmake
配置或编译时没有显示错误,但是当我尝试编译示例时,我得到以下信息:
D:\libqxt\examples>qmake examples.pro
D:\libqxt\examples>nmake
Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.
cd displaysettings\ && "C:\Program Files (x86)\Microsoft Visual Studio 1
0.0\VC\BIN\nmake.exe" -f Makefile
Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.
d:\Qt\4.8.4\bin\qmake.exe -o Makefile displaysettings.pro
"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\nmake.exe" -
f Makefile.Debug all
Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.
compiling .\displaysettingsdialog.cpp .\main.cpp
displaysettingsdialog.cpp
D:\libqxt\include\QxtGui\QxtScreen(1) : fatal error C1083: Cannot open include f
ile: 'qxtscreen.h': No such file or directory
main.cpp
D:\libqxt\include\QxtGui\QxtScreen(1) : fatal error C1083: Cannot open include f
ile: 'qxtscreen.h': No such file or directory
Generating Code...
NMAKE : fatal error U1077: 'echo' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0
\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
检查makefile,我发现“D:\libqxt\include”在包含路径中,但这不是“qxtscreen.h”所在的位置——它在“D:\libqxt\src”树中。当然,我可以手动编辑 makefile 来添加它,但我觉得这不是必需的,也许这表明我错过了一步。我做错了什么?
谢谢你的帮助!