Is it possible to develop DirectX apps in Linux?

You can't link against wine as it's essentially a call interdictor/translator rather than a set of libraries you can hook into. If linux is important go OpenGL/SDL/OpenAL.


I believe(I've never tried this) you can can compile Linux binarys against winelib. So it works just like a Linux executable, but with the windows libraries.

http://www.winehq.org/site/docs/winelib-guide/index


I've had some luck with this. I've managed to compile this simple Direct3D example.

I used winelib for this (wine-dev package on Ubuntu). Thanks to alastair for pointing me to winelib.

I modified the source slightly to convert the wchars to chars (1 on line 52, 2 on line 55, by removing the L before the string literals). There may be a way around this, but this got it up and running.

I then compiled the source with the following:

wineg++ -ld3d9 -ld3dx9 triangle.cpp

This generates an a.out.exe.so binary, as well as an a.out script to run it under wine.


If this is not about porting but creating, you should really consider OpenGL as this API is as powerful as DirectX and much easier to port to Mac or Linux.

I don't know your requirements so better mention it.