Ok i have:
And i get the error:
LPDIRECT3D9 pD3D = NULL;
LPDIRECT3DDEVICE9 pD3D_Device = NULL;
if( NULL == (pD3D = Direct3DCreate9(D3D_SDK_VERSION)))
[Linker error] undefined reference to `Direct3DCreate9@4'
I am using DirectX9 of course, and Dev V22.214.171.124
Thanks for the help :)
Ok this is terrible. Let's do a comparitive search on how many times Problems with DirectX this or that occurs in same thread as Dev C.
Dev C is probably the single largest thread-generator about problems in DX.
My advice, dump the ........ and get MSVC or something else.
I'm sorry I do not have the answer to your problem, but please, please, please, use something more compatible or that you don't have to hold your right pinky to your left ankle, turn to face exactly 125 degrees, and at the same time hit the compile button for it to work.
Yeah the DX libs just don't seem to work with gcc, even though, by the look of it your not even linking the libraries.
Yea i was afrade of that. Thanks for the responses any way.
Which one should i use then becouse i have 6.0 and when i add all my source files to a project i get a whole bunch of errors that make no sence.
MSVC 6.0 is no longer suported by directx, use a later version. You can download MSVC 2005 express for free.
Remember to link to the d3d library, either in your project settings or using a pragma statement.
PS: Direct3DCreate9 is being called outside of a function but I'm assuming thats not how your actual program looks.
#pragma comment(lib, "d3d9.lib")
You can use MSVC 6.0 if you copy the basetsd.h file stickied at the top of the game programming forum's main page.
There are no other problems that I know of in DX related to using MSVC or .NET 2003 or 2005.
basetsd.h is also available in the Windows SDK or Platform SDK. If you installed the MSDN library then you should have basetsd.h already on your drive. Simply point your compiler to this or copy the file and stick it in the folder for your project. MSVC should already know where basetsd.h is and will find it when you include it.
EDIT: I also have Enterprise edition which comes with the Platform SDK. So basetsd.h was already installed on my system. The student edition of MSVC will not have this. This is why we made basetsd.h available on this forum. You MUST have this to compile DirectX programs using MSVC 6.
I've never ...
I've never had problems with the DirectX 9 SDK using Visual C++ 6.0. I have VS 6.0 Enterprise Edition. And I have done quite a bit of DX9, and never had problems as far as linking to DX9, etc.