I recently got Visual Studio on a new computer, and to set up DirectX on it, I went to Tools>Options>Projects and Solutions>VC++ Directories and under Library Files made a new entry C:\Program Files\Microsoft DirectX SDK (August 2009)\Lib\x86
and now ran a test program (essentially just initialized DirectX) and it worked fine. However, if I change ...\Lib\x86 to ...\Lib\x64, than I get a linker error that Direct3DCreate9 is undefined:
1>main.obj : error LNK2019: unresolved external symbol _Direct3DCreate9@4 referenced in function "void __cdecl init(void)" (?init@@YAXXZ)
The x86 libraries are for 32-bit applications, and the x64 libraries are for 64-bit applications.
You can see which platform you are targetting in Visual Studio's Configuration Manager. Unless you have a good reason, you should be writing 32-bit applications, since 64-bit apps will require the 64-bit version of Windows to run.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With