Sign in to follow this  

adding direct x to source code

This topic is 4715 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

ok so after i install the directx sdk on my computer then what how do I add the directx library and header files to my program do i just type directx code like any other code where do i input the directx code ?? here is an example of what i mean. first i set up a project as normal then i type source code. # include < > <-------- what headers go here? using:: whatever int main(); { where do i type the directx code } once i start visual c++ and set up my project how do i add directx to my code??

Share this post


Link to post
Share on other sites
If you add this to your header file you should be set:


#pragma comment(lib, "d3d8.lib")
#pragma comment(lib, "d3dx8.lib")
#pragma comment(lib, "dxguid.lib")
#include <d3d8x.h>

Replace 8 with 9 if applicable.
You should also create a Win32 Project because you need a window for DirectX to run in.

Share this post


Link to post
Share on other sites

This topic is 4715 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Guest
This topic is now closed to further replies.
Sign in to follow this