Setting up VC++ 2010 for DirectX9

Started by
1 comment, last by Don_Xenon 12 years, 8 months ago
Hi GameDev community, first-time poster here. :D

Recently I started delving in the dark arts of DirectX 9 with the use of the official documentation. Although it's quite clear, I can't start a vcproj from scratch to work with the code from the tutorial samples.
What I do is start a new project, add an empty .cpp file and copy-paste the code from the tutorial files. Then I configure the IDE by opening Project -> *Projectname* Properties -> VC++ Directories and add the proper path to the Include Directories and Library Directories AND Project -> *Projectname* Properties -> Linker -> Additional Dependencies (d3d9.lib and d3dx9.lib).

For some demonic reasons, this only works with the code from the first two tutorials. Although some need the change in the Character Set from Multi-byte to Unicode, they still cause errors. For instance I get from the Matrices sample:

1>MATRICI.obj : error LNK2019: unresolved external symbol __imp__timeGetTime@0 referenced in function "void __cdecl SetupMatrices(void)" (?SetupMatrices@@YAXXZ)

And just by configuring VC++ and copy pasting the code.

Any help is highly appreciated. :)
Advertisement
The error says that it can't link against the timeGetTime function. Are you linking againsts Winmm.lib?
No I didn't and that solved the problem. Thanks a lot for the quick reply. :)

This topic is closed to new replies.

Advertisement