News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

DirectX projects

Started by Gorgro, April 08, 2010, 12:37:37 AM

Previous topic - Next topic

Gorgro

Hi,

I've recently gotten interested in working with DirectX, so i wanted to see what the basic program looked like. I downloaded the latest SDK and attempted to open a new DirectX project. It kept failing to locate the files even though i entered the correct path. i then did a little editing to the script, making it look for the d3d9.h file (instead of d3d.h)
Now it said i needed version 8 or higher, so knowing that 9 > 8, i put this part in comment because it seemed like the easiest way. Now i finally got in to the actual code. i compiled and a whole bunch of errors popped up, some of which could be resolved by changing the number 8 to 9, but not all of them.

I'm assuming this isn't supposed to happen, so can someone please explain to me how to make C::B work with directX the way it should? (I've been looking for answers for a few hours already before i decided to mess with the script so please don't just refer me to other websites or something like that)

I have C::B version 8.02, if it makes a difference

reckless

not sure about codeblocks included mingw as i use my own fork of it but i seem to remember that mingw had a minimal implementation of the directx api ?

ah aye it does try removing all the d3d*.h from mingws include folder i seem to recall that they not allways play nice with the ms directx sdk.

for good measure also get rid of dxerr*.h dsound.h ddraw.h *being the version number eg.9 in my case.


joubertdj

Although this has NOTHING to do with C::B, the guys at Allegro Games Library (www.liballeg.org) have a VERY UNOFFICIAL directx lib "wrapper" ...
http://allegro5.org/index.php?option=com_phocadownload&view=category&id=11:mingw-deps&Itemid=53

It works "well enough" ...

Gorgro

Removing the files from minGW hasn't worked and i'd like to try sticking to the official one for now. I'm seeing that besides the problems with the directories, the basic code automatically uses #include <d3d8.h> and tailors everything to version 8, maybe there has been an update to solve this already that i'm unaware of? I've searched the nightly builds for directX and the latest one to mention it was a 2008 one.

Jenna

The wizard was updated in december 2009 to work with dx8 and dx9.

I do not use any of them (obviously on linux), so I can't tell you anything further.

You can try a recent nightly, or wait for the coming release.

reckless

think i misunderstood the question  :?

ofc if the api directly requests dx8 then theres a bit more work to it to have it accept the dx9 calls.

in fact a ton of work as i can attest to from trying to update my aging voodoo2 dx8 driver to dx9  :lol:

stahta01

The last time I needed DirectX headers for MinGW, I used
http://mamedev.org/tools/ headers; not sure which version it uses was 9 a year or so ago.

http://mamedev.org/tools/20100102/directx-headers-for-mingw-20100102.zip

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]