Skip to main content
gamedev.net
🔒 Locked

DirectX Compile Problem

Started by Mighty 6 replies 800+ views
Original Post
Mighty
Mighty
hi i have this standard windows app which just runs a gray window. Works fine, so i wanted to add directx stuff to my windows app. however, just including the directx headers already causes an error when compiling. *edit* i am using (well, i want to use) direct9. The DX9SDK is fully installed. in my app, i added the following lines #include <d3d9.h> #include <d3dx9.h> (the compiler can find these files, so thats not the issue. furhtermore, it seems to be the d3dx header that causes my problems) when compiling with DevC++/MingW i get the following errors : file included from c:\dx90sdk\include\d3dx9math.h:1750, from c:\dx90sdk\include\d3dx9.h:45, from c:\framework.cpp:21: c:\dx90sdk\include\d3dx9math.inl: In function static void * _D3DXMATRIXA16::operator new(unsigned int)': c:\dx90sdk\include\d3dx9math.inl:966: UINT_PTR' undeclared (first use this function) c:\dx90sdk\include\d3dx9math.inl:966: parse error before &' c:\dx90sdk\include\d3dx9math.inl: In function static void * _D3DXMATRIXA16::operator new [](unsigned int)': c:\dx90sdk\include\d3dx9math.inl:979: parse error before `&' (it says : UINT_PTR undeclared, parse error in d3dx9math (2x)) so, i thought, lets try CygWin, but that produces exactly the same errors. so, on to Borland BCC55. sigh. that results in the following error : ! Error E2268 c:\dx90sdk\include\d3dx9math.inl 1552: Call to undefined func* tion 'sqrtf' in function D3DXVec2Length(const D3DXVECTOR2 *) (read : what the hell is sqrtf) !HELP! please.... ?
Madhed
Madhed
UINT_PTR I think is a basic type from the platform SDK...

Maybe you should #include<windows.h> before anything else.

Hope that helps...
Mighty
Mighty
Quote:
Original post by Madhed
UINT_PTR I think is a basic type from the platform SDK...

Maybe you should #include<windows.h> before anything else.

Hope that helps...


Already did that - just a basic window works, its just the dx stuff that causes it, i think.
Muhammad Haggag
Muhammad Haggag
Make sure the platform SDK include path comes on top of everything else.

Under VC++6: Tools->Options->Directories, select that of the platform SDK, move it to the top.

tomek_zielinski
tomek_zielinski
just
#define UINT_PTR UINT (or unisgned int)

it solves the problem in my program
www.tmreality.com
xyzzy00
xyzzy00
UINT_PTR should be defined as an unsigned integer with the same number of bits as a pointer. ie.. a UINT32 when compiling 32-bit targets, and a UINT64 when compiling 64-bit targets.

xyzzy

Topic Locked

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

Sign in to reply to this topic.