Archived

This topic is now archived and is closed to further replies.

Where I find DirectX 9 for MinGW?

This topic is 5042 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Unless there''s something I''m missing, DirectX is DirectX for all. that comes from (strugles to say the EVIL name) ...Microsoft. There, you can get the SDK too, I believe.

Technology can either save us or destroy us. Me ... I say it will destroy us if Microsoft is the example.

Share this post


Link to post
Share on other sites
quote:
Original post by Xeneth
Unless there''s something I''m missing, DirectX is DirectX for all. that comes from (strugles to say the EVIL name) ...Microsoft. There, you can get the SDK too, I believe.

Technology can either save us or destroy us. Me ... I say it will destroy us if Microsoft is the example.


no lib files are diff from a files. if you have dev-cpp(a mingw ide) you can get the files fro the update feature


Share this post


Link to post
Share on other sites
With directx programs the source usually needs to link to some static libaries which call DLL''s in the background which are the real guts of Directx, so you need to link your source with thous static libs, the problem is thous static libs that come with DX SDK are compatiable with visual studio and not MinGW but you can use a tool that comes with MinGW which converts them to form compataible with MinGW ld.

If you have latest directx 9.0 SDK installed what you can do is use a tool that comes with MinGW called reimp. Assuming you have the MinGW bin directory in your path, in the command prompt or shell go to the directory where the directx *.lib files (on my computer there at "C:\DXSDK\Lib") are and then for each one of the .lib files type "reimp NAME_OF_LIB.lib" and copy the generated files into the MinGW lib directory (on my pc its "C:\MinGW\lib").

To compile to executable with MinGW in the shell you need to tell the compiler where the header files are and which static libs your using. For example if your using direct draw you would add to the include path the header files (on my pc its "C:\DXSDK\Include") and add the static libs like this "-lddraw" to get them linked. with the gcc compile you just need to know a thew flags/options to add when you compile ill list''em here 4 u:

-L tells gcc which folder to look in for libaray files
(if its not in the default MinGW lib folder)

-I tells gcc which folder to look in for header files
(if its not in the default MinGW include folder)

-l tells gcc which libaries to link against your source


so with that you would type something like this to compile on my pc:

"gcc -o newNameOfexe nameOfSource.c -I"C:\DXSDK\Include"
-lddraw

depending on which parts of the libaries use you may need to link more than one static libaray, i hope this was clear 4 yah

Share this post


Link to post
Share on other sites