利用vc++做的第一个程序,就出错了。(关于DirectX)
我找一篇文章抄了一段程序,但是一编译就出错谁能给我解释一下:
我吧那段文章已经摘录下来。(我就是找他做的)
Okay, that’s enough theory lets get started. Follow the step-by-step guide below to create your first DirectX Graphics project.
1. In Visual C++ create a new Win32 Application.
a. File > New
b. From the Projects tab select Win32 Application
c. Enter a name for your project such as “DX Project 1”
d. Select a folder for the location of your source code files
e. Click Next
f. Select the empty project option.
g. Click Finish
2. Make sure that your project settings are correct.
a. Project > Settings...
b. On the Link tab, make sure that "d3d8.lib" is in the list of Object/Library Modules. If it isn’t simply type it in.
3. Make sure that your search paths are correct.
a. Tools > Options > Directories Tab
b. In the "Show directories for" drop-down, select "include files".
c. If it does not exist already, add the following path: <SDK INSTALL PATH>\include.
d. Make sure that this path is at the top of the list by clicking on the up arrow button (if needed).
e. In the "Show directories for" drop-down, select "library files".
f. If it does not exist already, add the following path: <SDK INSTALL PATH>\lib.
g. Make sure that this path is at the top of the list by clicking on the up arrow button (if needed).
4. Add the source code.
a. File > New
b. From the Files tab, select C++ Source File
c. Enter a filename such as “Main.cpp”
d. Copy the code segment below, and then paste it into your new file.
5. Build and Run the program.
a. Press F7 to build your project
b. Press F5 to run