DirectX5.0 Latest Game Programming Guide DirectDraw Tutorial One, Configuring DirectX SDK

zhaozj2021-02-11  194

DirectX5.0 Latest Game Programming Guide DirectDraw Tutorial

DirectX is prepared for users of Visual C , so the DirectDraw game program is to be prepared, and it is best to have a certain understanding of VC. Users who are unwilling to use VC can also take advantage of the Message Arakelian Soft to develop ActiveX control DirectStudio98 or Tegosoft's Tegosoft ActiveX for Visual Basic for Visual Basic5.0 users. However, if you want to give full play to DirectX performance, and you want to keep the program's compatibility, it is best to use Visual C . For the convenience of narrative, it is assumed that DirectX5.0 SDK and Visual C 5.0 have been installed, and its directory is C: / DX5SDK and C: / Program Files / DevStudio. If you use another compiler or install it to other directories, you must do appropriate modifications to make appropriate modifications. Someone has installed DirectX SDK, but I don't know how to use because it is based on Visual C , but there is no interface-friendly integrated development environment, so Visual C must be appropriately formulated.

First, configure DirectX SDK1.1, configure Microsoft Developer Studio to compile the DirectX SDK, you need to open a new Project Workspace, insert the appropriate file, set the environment variable to find the compiler to find the required link library and include files, below Describe all the processes of the settings. Start Microsoft Developer Studio, install the following steps to create the project:. In the File menu, select New. In the New dialog box, select Win32 Application in Project, enter DDEX1 in Project Name. Enter the location of the project file in the location text box, Point OK button. A new DDEX1 CLASSES folder appears on the left of the Workspace window. After the project is created, you need to use the following steps to insert the appropriate file to the project:. On the Project menu Select Add Toproject | Files. Browse to the C: / DX5SDK / SDK / Samples / DDEX1 directory, select all files. Select OK, this directory DDEX1.CPP, Ddex1.rc, resource.h joined the project. Then set the path to the file:. In the Tools menu, select Options, pop up the options dialog box. Select Directories, select Include Files in the Show Directories FOR list box. On the Directories: list box Double-click the blank line at the bottom of the list, enter C: / DX5SDK / SDK / INC. Agitated another path C: / DX5SDK / SDK / Samples / Misc. Select the OK button, set the link library directory: Library Files in the show directories for list box. Double click on the Directories: list box Double click The bottom blank line, enter C: / DX5SDK / SDK / LIB. Click the OK button. Finally set the module that is linked when establishing an application:. Click Settings in the Project menu. Select Link. Select General. In the Category drop-down box Select General.. Add DDRaw.lib and Winmm.lib. Click OK.. Click OK.... 1.2, formulated NMAKE path Sometimes the way the command line is more convenient than the integrated environment, so many experienced programmers are more willing to build applications in the way they are command line. The following is the path to the file and link library module: @echo offset path = c: / program files / devstudio / sharedide / bin; c: / program files / devstudio / vc / bin;% PATH% SET INCLUDE = C: / Program Files / devStudio / VC / include; c: / program files / devstudio / vc / mfc / include; c: / dx5sdk / sdk / inc;% include% set lib = c: / program files / devstudio / sharedide / vc / lib ; C: / program files / devstudio / vc / mfc / lib; c: / dx5sdk / sdk / lib;% lib% set init = c: / program files / devstudio;% init% joining the above content to AutoExec.bat. Enter NMAKE in the example of an example will create a debug directory in the current directory and place the generated executable in this directory.

转载请注明原文地址:https://www.9cbs.com/read-4902.html

New Post(0)