配置NetBeans以使用DirectX

时间:2013-09-25 16:29:06

标签: c++ netbeans cygwin directx

我安装了带有Cygwin编译器的NetBeans 7.2.1。我想在NetBeans中设置Direct X,所以我右键单击了该项目 - >属性 - > C ++编译器 - >包含目录,并在DirectX SDK中添加了包含,再次转到属性 - >链接器 - >其他库目录并在DirectX SDK中添加了Lib(x86)。但是当我编译它时会显示出来:

"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory `/cygdrive/c/Users/Jacob/Documents/NetBeansProjects/DX_trial'
"/usr/bin/make"  -f nbproject/Makefile-Debug.mk dist/Debug/Cygwin-Windows/dx_trial.exe
make[2]: Entering directory `/cygdrive/c/Users/Jacob/Documents/NetBeansProjects  /DX_trial'
mkdir -p build/Debug/Cygwin-Windows
rm -f build/Debug/Cygwin-Windows/main.o.d
g++.exe    -c -g -I/cygdrive/D/Direct\ X\ SDK/Include -MMD -MP -MF build/Debug/Cygwin-    Windows/main.o.d -o build/Debug/Cygwin-Windows/main.o main.cpp
main.cpp: In function `int WinMain(HINSTANCE__*, HINSTANCE__*, CHAR*, int)':
main.cpp:60: warning: passing NULL used for non-pointer converting 1 of `HWND__* CreateWindowExA(DWORD, const CHAR*, const CHAR*, DWORD, int, int, int, int, HWND__*, HMENU__*, HINSTANCE__*, void*)'
main.cpp:191:2: warning: no newline at end of file
mkdir -p dist/Debug/Cygwin-Windows
g++.exe     -o dist/Debug/Cygwin-Windows/dx_trial build/Debug/Cygwin-Windows/main.o -L/cygdrive/D/Direct\ X\ SDK/Lib/x86 
build/Debug/Cygwin-Windows/main.o: In function `_Z7initD3DP6HWND__':
/cygdrive/c/Users/Jacob/Documents/NetBeansProjects/DX_trial/main.cpp:111: undefined reference to `_Direct3DCreate9@4'
collect2: ld returned 1 exit status
make[2]: *** [dist/Debug/Cygwin-Windows/dx_trial.exe] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
nbproject/Makefile-Debug.mk:62: recipe for target `dist/Debug/Cygwin-Windows    /dx_trial.exe' failed
make[2]: Leaving directory `/cygdrive/c/Users/Jacob/Documents/NetBeansProjects  /DX_trial'
nbproject/Makefile-Debug.mk:59: recipe for target `.build-conf' failed
make[1]: Leaving directory `/cygdrive/c/Users/Jacob/Documents/NetBeansProjects  /DX_trial'
nbproject/Makefile-impl.mk:39: recipe for target `.build-impl' failed


BUILD FAILED (exit value 2, total time: 2s)

配置中是否有问题? ,因为我从教程复制和粘贴的代码,它在另一个编译器上工作。任何帮助都将不胜感激。

0 个答案:

没有答案