   Setting up DirectX with Visual C++
  I just figured out how to set up visual c++ with the platform sdk. Now I kneed to know how to use DirectX with visual c++   
  Firstly, you have to download it from the microsoft website (I think it's a couple hundred megabytes). Then you unpack it - I suggest a simple-to-reach directly like C:\DXSDK\. Then, you need to go under Tools->Options->Projects and Solutions->VC++ Directories. Under the selection box "Show Directories For", select "Library Files" and add the directory "C:/DXSDK/Lib"; then the same for "Include Files" and "C:/DXSDK/Include". Then, when you make a project, select Project->Properties->Linker->Input, and under Additional Dependencies, enter these items separated by a space: "d3d9.lib d3dx9.lib"; if your reference material calls for others, add them as well. You could alternatively do this right in your code with:#pragma comment(lib, "d3d9.lib")#pragma comment(lib, "d3dx9.lib")Then, in your project, simply #include the DirectX headers:#include <d3dx9.h> // this automatically includes d3d9.hThen you're all set to use DirectX.   ;  thanks. Could someone also link to a good tut for reference?   ;Quote:Original post by v0dKAFirstly, you have to download it from the microsoft website (I think it's a couple hundred megabytes). Then you unpack it - I suggest a simple-to-reach directly like C:\DXSDK\. Then, you need to go under Tools->Options->Projects and Solutions->VC++ Directories. Under the selection box "Show Directories For", select "Library Files" and add the directory "C:/DXSDK/Lib"; then the same for "Include Files" and "C:/DXSDK/Include". Then, when you make a project, select Project->Properties->Linker->Input, and under Additional Dependencies, enter these items separated by a space: "d3d9.lib d3dx9.lib"; if your reference material calls for others, add them as well. You could alternatively do this right in your code with:#pragma comment(lib, "d3d9.lib")#pragma comment(lib, "d3dx9.lib")Then, in your project, simply #include the DirectX headers:#include <d3dx9.h> // this automatically includes d3d9.hThen you're all set to use DirectX.How about for the bin section? I had to do that for the platform sdk installation.   ;Quote:Original post by negativezero48Quote:Original post by v0dKAFirstly, you have to download it from the microsoft website (I think it's a couple hundred megabytes). Then you unpack it - I suggest a simple-to-reach directly like C:\DXSDK\. Then, you need to go under Tools->Options->Projects and Solutions->VC++ Directories. Under the selection box "Show Directories For", select "Library Files" and add the directory "C:/DXSDK/Lib"; then the same for "Include Files" and "C:/DXSDK/Include". Then, when you make a project, select Project->Properties->Linker->Input, and under Additional Dependencies, enter these items separated by a space: "d3d9.lib d3dx9.lib"; if your reference material calls for others, add them as well. You could alternatively do this right in your code with:#pragma comment(lib, "d3d9.lib")#pragma comment(lib, "d3dx9.lib")Then, in your project, simply #include the DirectX headers:#include <d3dx9.h> // this automatically includes d3d9.hThen you're all set to use DirectX.How about for the bin section? I had to do that for the platform sdk installation.You shouldn't need the Bin section. ;  I have installed directx according to the previous post. Only one problem. When I open the samples that were included in the install, none of them work. :|   ;  Could you define "none of them work"? How do they not work?   ;Quote:Original post by Dave HuntCould you define "none of them work"? How do they not work?Here is the output:1>------ Build started: Project: Text3D, Configuration: Debug Win32 ------1>Compiling...1>dxstdafx.cpp1>Compiling...1>DXUT.cpp1>DXUTenum.cpp1>DXUTgui.cpp1>DXUTmisc.cpp1>DXUTRes.cpp1>DXUTSettingsDlg.cpp1>text3d.cpp1>Generating Code...1>Compiling resources...1>Linking...1>LINK : fatal error LNK1104: cannot open file 'dxerr.lib'1>Build log was saved at "file://c:\Program Files\Microsoft DirectX SDK (April 2006)\Samples\C++\Direct3D\Text3D\Debug\BuildLog.htm"1>Text3D - 1 error(s), 0 warning(s)========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========   ;  To the list of the libraries I told you to link ("d3d9.lib d3dx9.lib"), you have to add "dxerr9.lib" (it may actually be "dxerr.lib" if that does not work). I'm not sure if you have to include anything for this... if it doesn't work, try to #include <dxerr9.h>. Generally, the header files have the same name as the library files.   