Can g++ and minGW on Windows XP use the Windows SDK?
Specifically, why does g++ fail to compile:
#include <stdio.h>
#include <windows.h>
int main(void) {
printf("!!!Hello World!!!");
return EXIT_SUCCESS;
}
I have tried compiling by by running:
g++ -c -Wall Test.cpp -IC:/Program Files/Microsoft Platform SDK/Include/
I get a litany of compile errors beginning with
winnt.h:666:2: #error Must define a target architecture.
I have installed the Windows Server 2003 SP1 Platform SDK
Background
I am working on a large real-time image processing software project that up until now has used g++, minGW and gnu make files (written by hand). For a new feature, I need to interface with a frame grabber that has an SDK which was designed for Visual Studio. The framegrabber SDK depends on header files from the Windows SDK.
Do I need to learn Visual Studio or is there another way?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…