どこかで調整できるコンパイラ設定があることを願っています。ここでソースコードに準拠しようとしています: http://www.directxtutorial.com/Lesson.aspx?lessonid=9-4-1
Visual Studio 2010 でコンパイルできますが、netbeans を介して g++ でコンパイルしようとすると、これらのエラーが発生します。
"/usr/bin/make" -f nbproject/Makefile-Release.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory `/cygdrive/c/Users/Stephen/Documents/Projects/C++/test'
"/usr/bin/make" -f nbproject/Makefile-Release.mk dist/Release/Cygwin-Windows/test.exe
make[2]: Entering directory `/cygdrive/c/Users/Stephen/Documents/Projects/C++/test'
mkdir -p build/Release/Cygwin-Windows
rm -f build/Release/Cygwin-Windows/main.o.d
g++.exe -c -g -MMD -MP -MF build/Release/Cygwin-Windows/main.o.d -o build/Release/Cygwin-Windows/main.o main.cpp
main.cpp: In function `int WinMain(HINSTANCE__*, HINSTANCE__*, CHAR*, int)':
main.cpp:39: error: cannot convert `const wchar_t[12]' to `const CHAR*' in assignment
main.cpp:52: warning: converting to non-pointer type `DWORD' from NULL
main.cpp:52: error: cannot convert `const wchar_t*' to `const CHAR*' for argument `2' to `HWND__* CreateWindowExA(DWORD, const CHAR*, const CHAR*, DWORD, int, int, int, int, HWND__*, HMENU__*, HINSTANCE__*, void*)'
nbproject/Makefile-Release.mk:66: recipe for target `build/Release/Cygwin-Windows/main.o' failed
make[2]: *** [build/Release/Cygwin-Windows/main.o] Error 1
make[2]: Leaving directory `/cygdrive/c/Users/Stephen/Documents/Projects/C++/test'
make[1]: *** [.build-conf] Error 2
nbproject/Makefile-Release.mk:59: recipe for target `.build-conf' failed
make: *** [.build-impl] Error 2
make[1]: Leaving directory `/cygdrive/c/Users/Stephen/Documents/Projects/C++/test'
nbproject/Makefile-impl.mk:39: recipe for target `.build-impl' failed
BUILD FAILED (exit value 2, total time: 1s)
main.cpp を簡単に取り除くことができます: 39 および 52 エラー、残りは通過しません