Skip to main content
gamedev.net
🔒 Locked

adding direct x to source code

Started by cellman Jan 18, 2005 at 6:00 PM 0 replies 800+ views
Original Post
cellman
cellman
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??
Prototype
Prototype
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.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.