Gcc compiler; is it compatible with directx?; how to include libs and headers

Can anyone tell me if gcc is compatible with directx, specificaly directx 9. Also, what do I need to do to set up the compiler to include the directx librarys, So everything is peaches and creme? thanks y'all
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Well, technically, I don't see why gcc would NOT be compatible with DirectX9. The only problems I do see are that you would be compiling in a UNIX/Linux enviornment that would probably not have the usual windows libraries. If you could find some way to get the windows platform SDK along with the DirectX SDK, you might be in business.

Best way to find out is to try, but the real best way is to just go download the command-line compilers for Visual C++ or Borland C++ for the windows environment.

If you're dead set on using gcc, though, the -I and -L command line options can be used to specify directories for header files and library files, respectively. You should add those commands with the paths to your DirectX SDK and Windows Platform SDK to any command line to compile your code.


That's a link to the manual entry for gcc's directory commands. Just delete the last bit of the address to get to the whole manual. Good luck!

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
There are versions of gcc for the Windows platform.

See here


It seems that the mingw32 version can support directx.  See here


I couldn't find directx9 support out there at the moment.  5 is out there and 6 may be there as well.
skeid21Author Commented:
I have ran accross some documentation that puts gcc being able to work with directx,(maybee not 9). But moving on from that question,(although -l and -L should work), I was wondering if there is a way to permently include a directory into the seached directorys for libs and headers that gcc uses.
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Post your closing recommendations!  No comment means you don't care.
Delete and refund.  Not fully answered.
see http://www.dcs.warwick.ac.uk/~csucew/directx-mingw/

it has all the info you need and works with DirectX 9

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.