PHCreed
Would you like to react to this message? Create an account in a few clicks or log in to continue.

PHCreed

PHCreed Unlimitboard Online Tambayan
 
HomePortalGalleryLatest imagesSearchRegisterLog in

 

 Setting Up VC++ and DirectX

Go down 
AuthorMessage
Admin
Admin
Admin
Admin


Posts : 92
Join date : 17/02/2013
Age : 29
Location : iloilo

Setting Up VC++ and DirectX Empty
PostSubject: Setting Up VC++ and DirectX   Setting Up VC++ and DirectX EmptyFri Feb 22, 2013 5:43 pm

Installing Microsoft Visual C++ Express


1.) Download the installation package from microsoft.com: [You must be registered and logged in to see this link.]

2.) Run the file and allow it to install VC++.

3.) You might want to register after installing; either way, it is free.

Installing Microsoft DirectX SDK

1.) Download the installation package from microsoft.com: [You must be registered and logged in to see this link.]

2.) Install the SDK by running the executable.

3.) Once all that is done you want to configure Visual C++ so that it will find DirectX. ( Usually this is done automatically, but not always so I'll explain anyway. ) NOTE: This is for Visual Studio 2008, for the 2010 instructions scroll down!

VS2008

Open up VC++ and go to Tools -> Options, this dialog should pop up:
[You must be registered and logged in to see this link.]

In the image you can see that I've highlighted some things you want to unfold. "Executable files" is also highlighted because you need to change it. First, change it to "Include files". Once you've done that you should add a new line and add the "\Microsoft DirectX SDK (August 2009)\Include" directory like so:
[You must be registered and logged in to see this link.]


Notice that "Include files" is selected in the top right corner and that because I have a x64 OS my program files has (x86) behind it. If you do not have x64 OS then the DirectX SDK is located in the regular Program Files folder.

There are some other lines visible but those are not important for DirectX.

Now that we have the "Include" directories set up, we need to add the "Library" directories.

Select the "Library files" from the little drop-down list and again add a new line like so:

[You must be registered and logged in to see this link.]

Notice that you need to select either the x86 directory in "Microsoft DirectX SDK (August 2009)\Lib\" or the x64. Select the x86 folder no matter what your OS is. ( x64 is used for building 64-bit applications which you will probably not be doing )

Now there is only very important step that yet remains: Click the OK button, don't just close the window as your settings will not be saved if you do.

For 2008; Visual C++ will now always find your DirectX SDK ( headers and libraries ). You should be able to compile DirectX dependant code just fine now.

VS2010


Right click on the project and go to properties:

Click this bar to view the full image.

Go to the Visual C++ Directories tab ( this is new in 2010 ) and add the correct libraries, scroll up to see which ones. ( They are detailed in the above pictures. ( Note that you might have the 2010 version of DirectX, the screenshots show the 2009 version, they should both work fine )

[You must be registered and logged in to see this link.]

Some hints as to how to add new lines/folders:


Unfortunately, for VS2010, you will have to do this for every project, if anyone knows a way to get this standardised, please share

Credits: Crime_llocca
=================================

ONLY SHARING THIS THREAD
COZ IT HELPS ME A LOT


Back to top Go down
https://phcreed.forumeiros.com
 
Setting Up VC++ and DirectX
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
PHCreed :: Programming :: C++-
Jump to: