Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1003
  • Last Modified:

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
1 Solution
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!
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.
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

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


Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now