Effects11 DirectX11 for GCC Compiler

Started by
3 comments, last by BitMaster 8 years, 3 months ago

Hi,

i'm a beginner with DirectX11 and i tried to compile some shader with the DirectX11 libs and TDM-GCC.

For compiling a pixel shader i need the function call

D3D11CreateEffectFromMemory(...)

But this is not part of the libs of the compiler...

I think the project of DirectX Effects can be found at:

https://fx11.codeplex.com

but there is no project for compiling with GCC...

So is there any lib for the GCC compiler available for DirectX Effects11 ??

Best regards,

Alex

Advertisement
Not an answer to your actual question, but what reason on earth do you possibly have for trying to use GCC to compile Windows apps in this day and age? Just go download the totally free Visual Studio Community Edition that gives you Microsoft's compiler which of course fully supports the DirectX headers, also gives you the proper up-to-date Windows/DirectX SDKs, and of course also give you a proper IDE. Or if you're one of those irrational "bloat haters" then download the also-free and lighter-weight Microsoft C++ Build Tools (preview/beta) instead and then use Sublime or GVim or whatever you prefer for writing the code. Using the GNU tools for Windows is like trying to do maintenance on a sports car using a bronze ax. :/

Sean Middleditch – Game Systems Engineer – Join my team!

I'd like to strongly disagree with Sean's opinion. While my professional life revolves around various flavors of MSVC, I have moved towards a gcc-based approach for my hobby projects and I'm certainly enjoying the ride as well as realizing it has made me a better programmer. The only thing I usually miss from MSVC are the debugging features (although newer QtCreators have certainly improved a lot in that regard since I first started using them).
That said, for a beginner in the language I would still strongly recommend starting with MSVC (at least when on Windows). It is pretty much the standard compiler and using another compiler usually forces you to get every library you want compiled yourself. That is in itself not a bad thing which will force you to learn a lot. Just not when you are starting out.

As far as I know, DirectX is not compileable anything else than MSVC. This is a kind of vendor lock-in. I'm not really up-to-date, but I think it's improbable that anything changed in this question.

I have never really tried it out but my MinGW-w64 distribution appears to contain DirectX headers and libraries from version 8 to 11 out of the box. The problem appears to be solely regarding D3D11CreateEffectFromMemory. Someone more familiar with DirectX might be able to give but I'm getting extremely few answers for a "D3D11CreateEffectFromMemory" search string while "D3D10CreateEffectFromMemory" produces lots of results. Apparently the function was part of the SDK for version 10 but got removed for version 11, though there still is the aforementioned OpenSource project to get the functionality back.

TinTin2016: There does not seem to be anything really interesting happening in the library. I would just try to compile the implementation files in there as a library using your flavor of gcc and you are probably done. If that does not work (and you don't have an idea what exactly goes wrong) or you do not know what to do with that advise I would recommend doing what I already suggested above: start with the platform's default compiler (in case of Windows: MSVC).

This topic is closed to new replies.

Advertisement