Problems with DirectXSDK9
Hi
I''ve downloaded recently DirectX 9 SDK. And I have problem with compile some of those examples. For example let''s take one project, wchich is in directory Direct3D. This project is called Fur. When I try to compile it, there are errors(look at the end of this post). Of course I included include and library files(You know Tools-Options-Directories). When I was using DirectXSDK8 I didn''t have any problems. Unfortunetly, there is also another problem. The only examples that I can compile without problems are Tutorials. As just I said I can compile them without problems. But I can''t run them. When I click for example on create device exe, nothing happens. Im using Windows 98SE, Microsoft Visual c++ 6.0 enterprise edition.
Thanks for reading this long post and Im sorry for my poor englisch.
d3dapp.cpp
D:\Michal\Microsoft Visual Studio\DX9\Samples\C++\common\src\d3dapp.cpp(832) : error C2065: ''ULongToHandle'' : undeclared identifier
d3denumeration.cpp
D:\Michal\Microsoft Visual Studio\DX9\Samples\C++\Common\src\d3dsettings.cpp(276) : error C2664: ''DialogBoxParamA'' : cannot convert parameter 4 from ''long (struct HWND__ *,unsigned int,unsigned int,long)'' to ''int (__stdcall *)(struct HWND__ *,unsign
ed int,unsigned int,long)''
None of the functions with this name in scope match the target type
D:\Michal\Microsoft Visual Studio\DX9\Samples\C++\common\src\d3dapp.cpp(832) : error C2065: ''ULongToHandle'' : undeclared identifier
d3denumeration.cpp
d3dfont.cpp
d3dsettings.cpp
D:\Michal\Microsoft Visual Studio\DX9\Samples\C++\Common\src\d3dsettings.cpp(276) : error C2664: ''DialogBoxParamA'' : cannot convert parameter 4 from ''long (struct HWND__ *,unsigned int,unsigned int,long)'' to ''int (__stdcall *)(struct HWND__ *,unsign
ed int,unsigned int,long)'' None of the functions with this name in scope match the target type
D:\Michal\Microsoft Visual Studio\DX9\Samples\C++\Common\src\d3dsettings.cpp(498) : error C2065: ''ULongToPtr'' : undeclared identifier
D:\Michal\Microsoft Visual Studio\DX9\Samples\C++\Common\src\d3dsettings.cpp(671) : error C2065: ''UlongToPtr'' : undeclared identifier
Keep in mind that you need to DL DirectX 9 runtime seperately from the sdk.
Also you are missing a library or header file (or both) that has the definitions of ULongToPointer and ULongToHandle, and it also appears there is something wrong with your MSg Proc.
Try using this prototype for the Message PRoc for your dialog box
LRESULT WINAPI MsgProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam )
I would guess by the errors that you are using
int MsgProc.
See if these things help;.
Also you are missing a library or header file (or both) that has the definitions of ULongToPointer and ULongToHandle, and it also appears there is something wrong with your MSg Proc.
Try using this prototype for the Message PRoc for your dialog box
LRESULT WINAPI MsgProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam )
I would guess by the errors that you are using
int MsgProc.
See if these things help;.
TechleadEnilno, the Ultima 2 projectwww.dr-code.org/enilno
thx for your very fast reply.
Sorry I hadnt mentioned before, that I had already installed Directx9 runtime.
Your words are a little kind of Black Magic. Becouse I don''t know
where should I write LRESULT WINAPI MsgProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam ). And also I didn''t change anything in These projects(These projects are orginal SDK projects, so I thought that they shoul compile easily).
Sorry I hadnt mentioned before, that I had already installed Directx9 runtime.
Your words are a little kind of Black Magic. Becouse I don''t know
where should I write LRESULT WINAPI MsgProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam ). And also I didn''t change anything in These projects(These projects are orginal SDK projects, so I thought that they shoul compile easily).
The only other thing I can think of is to make sure in your
Project->Settings->Link tab to make sure all the DX9 libraries are there, and to make sure your
Tools->Options->Directories for the Header and Library files point to the SDK.
Project->Settings->Link tab to make sure all the DX9 libraries are there, and to make sure your
Tools->Options->Directories for the Header and Library files point to the SDK.
TechleadEnilno, the Ultima 2 projectwww.dr-code.org/enilno
quote: Original post by Sokoll
Studio\DX9\Samples\C++\common\src\d3dapp.cpp(832) : error C2065: ''ULongToHandle'' : undeclared identifier
your directx include directory must be the first on the list; it currently is not.
quote:
D:\Michal\Microsoft Visual Studio\DX9\Samples\C++\Common\src\d3dsettings.cpp(276) : error C2664: ''DialogBoxParamA'' : cannot convert parameter 4 from ''long (struct HWND__ *,unsigned int,unsigned int,long)'' to ''int (__stdcall *)(struct HWND__ *,unsign
ed int,unsigned int,long)''
None of the functions with this name in scope match the target type
this shouldn''t happen. try fixing the other error firsr.
quote: Original post by niyawOriginal post by Sokoll
Studio\DX9\Samples\C++\common\src\d3dapp.cpp(832) : error C2065: 'ULongToHandle' : undeclared identifier
"your directx include directory must be the first on the list; it currently is not."
hi, thx again Niyaw, and RhoneRanger for reply.
Talk to me like I'm three years old
What should I do to make DirectX include directory to be the first on the list?
Do u think if I format my computrr It will help?
[edited by - Sokoll on January 28, 2003 9:09:29 AM]
[edited by - Sokoll on January 28, 2003 9:10:33 AM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement