Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: Extrakun on May 29, 2006, 07:29:12 am
-
Hi all,
I am new to CodeBlocks and would like to enquiry how to use DirectX with CodeBlocks. I already have installed the DirectX 9.0 (October) SDK and was using Visual Studo .Net.
Thanks in advance!
-
Hi all,
I am new to CodeBlocks and would like to enquiry how to use DirectX with CodeBlocks. I already have installed the DirectX 9.0 (October) SDK and was using Visual Studo .Net.
Thanks in advance!
Search the forum with "DirectX". :D
There is a DirectX template that comes with Code::Blocks that would be the easiest way.....
Maybe some of these will help you.
http://forums.codeblocks.org/index.php?topic=750.0
http://forums.codeblocks.org/index.php?topic=1373.0
http://forums.codeblocks.org/index.php?topic=914.0
Oh BTW why don't you use OpenGL (I DO NOT want to start a flamewar just asking)?
-
Project requirement, which I can't change...
Thanks for the links, I will take a look!
-
Project requirement, which I can't change...
Thanks for the links, I will take a look!
Sure no problem.
If you do not have a nightly build grab one from here.
http://forums.codeblocks.org/index.php?board=20.0
-
There is nothing special about setting up directx in codeblocks, it's just a normal library.
Add the include and lib directories to your path setup, and then include the appropriate files as they are needed. Type all the lib names in the linker config for your project just like you would any other library. Very easy.
Seth, "DirectX vs OpenGL" does not compute. Only "Direct3D vs OpenGL". Lots of us use OpenGL for graphics, and DirectX for the rest.
-
There is nothing special about setting up directx in codeblocks, it's just a normal library.
Add the include and lib directories to your path setup, and then include the appropriate files as they are needed. Type all the lib names in the linker config for your project just like you would any other library. Very easy.
Seth, "DirectX vs OpenGL" does not compute. Only "Direct3D vs OpenGL". Lots of us use OpenGL for graphics, and DirectX for the rest.
Nowhere in my post did I say DirectX vs OpenGL.
I just wondered why he was useing DirectX. ;)
-
DirectX != graphics;
Looks familiar. :P
But it's true.
DirectX != Graphics. DirectX is a bunch of apis, not one api. They are are seperate apis that serve their own functions, the only api that collides with OpenGL is Direct3D. Using OpenGL and the rest DirectX at the same time is very common.
I know you didn't say OpenGL vs DirectX. Just wanted to clear it up. ;)
Extrakun, for your linking order, put dxguid first, and then the rest of the libs as needed eg:
dxguid
dsound
dinput
d3d
-
DirectX != graphics;
Looks familiar. :P
But it's true.
DirectX != Graphics. DirectX is a bunch of apis, not one api. They are are seperate apis that serve their own functions, the only api that collides with OpenGL is Direct3D. Using OpenGL and the rest DirectX at the same time is very common.
Yup I stole Thomas's phrase (sort of). :lol: Just like you said DirectX is a bunch of API's that each has a seperate purpose. Anyways, I hope the OP gets his problem fixed.
-
Hi!
I have some problems using directX SDK with C::B. I downloaded this new version of C::B(8.2), and intalled it. When I try to create a new directX project I get this dialog to give the name of the project and so on. Everything is fine, until the last part when i should actually type in the directory of the directX SDK. I have the Microsoft DirectX SDK 2007 november installed in my Program Files, but when I choose the folder I get this message :
"The path you entered seems valid, but this wizzard can't locate directx files in it..."
wich is a bit strange because the files should be there. I dont know exactly wich files are needed, but the Include and Lib directories are there, and I just cant figure it out, whats wrong :S
Can I get any help here? :)
-
I have the Microsoft DirectX SDK 2007 november installed in my Program Files, but when I choose the folder I get this message :
"The path you entered seems valid, but this wizzard can't locate directx files in it..."
Judging from the message you get, it's failing to find <dxdir>/include/d3d.h.
I haven't tested the dx wizard for quite some time now but, if there's a bug, you could fix it and provide a patch for others to test and eventually get committed to our repository.
Don't worry, it's easy:
- Click "File->New->Project"
- Right-click the "Direct/X project" icon
- Click on "Edit this script". You should be seeing the wizard script open in a new editor now :).
- Find the function named "OnLeave_DirectXPath"
Fix what needs fixing in there and save the file.
-
Well, not quite the answer is was looking for, but you got me excited :) I will look at this thing, as soon as I get home.
I will post it here if I find somethig, i hope I will Oo
-
right, I just got home and I see no "d3d.h" file in the DirectX sdk :s I see tho d3dx.h and d3d9.h wich one should be needed?
edit :: dx9 sdk november does not include d3d8.h wich is needed for the script, and for the generated sample dx application as well :S
-
d3d9.h wich one should be needed?
This one.
BTW: I have already a working DX8/9 wizard... it just need some polishing before commit.