【发布时间】:2011-01-02 14:06:19
【问题描述】:
Windows XP 上的 g++ 和 minGW 可以使用 Windows SDK 吗?
具体来说,为什么g++编译失败:
#include <stdio.h>
#include <windows.h>
int main(void) {
printf("!!!Hello World!!!");
return EXIT_SUCCESS;
}
我尝试通过运行编译:
g++ -c -Wall Test.cpp -IC:/Program\ Files/Microsoft\ Platform\ SDK/Include/
我收到一连串以
开头的编译错误winnt.h:666:2: #error Must define a target architecture.
我已经安装了Windows Server 2003 SP1 Platform SDK
背景
我正在开发一个大型实时图像处理软件项目,到目前为止,该项目一直使用 g++、minGW 和 gnu 制作文件(手写)。对于新功能,我需要与具有SDK which was designed for Visual Studio 的frame grabber 交互。 framegrabber SDK 依赖于 Windows SDK 的头文件。
我需要学习 Visual Studio 还是有其他方法?
【问题讨论】:
-
但也许他只是想输入“make”
-
这似乎也是一个很好的参考:osix.net/modules/article/?id=670
标签: c++ windows visual-studio g++ mingw