D on Windows - linker question

Andrew diehertz at gmail.com
Mon Oct 21 01:12:38 PDT 2013


On Monday, 21 October 2013 at 07:56:49 UTC, evilrat wrote:
> On Monday, 21 October 2013 at 07:46:41 UTC, Andrew wrote:
>> On Monday, 21 October 2013 at 04:38:05 UTC, evilrat wrote:
>>> On Sunday, 20 October 2013 at 21:47:53 UTC, Erik van Velzen 
>>> wrote:
>>>> My goal was to learn D and Direct3D at the same time.
>>>>
>>>> I've tried to set up DMD to do this, but I keep running into 
>>>> issues that the available DirectX11 and win32 headers are 
>>>> incomplete, or won't compile (tried both dmd 2.063 and 
>>>> 2.064, they halt on different type errors), or won't link.
>>>>
>>>> To be fair, these are only a few errors, but when the linker 
>>>> spews out some obfuscated function name I really don't know 
>>>> what to do.
>>>>
>>>> Will I have more luck with GDC? Or should I try to make 
>>>> headers on my own incrementally? (or take the easy route and 
>>>> use C++?)
>>>
>>> i'm currently trying to get up 
>>> DirectX(d3d10(x),d3d11(x),xaudio2,x3daudio,d3dmath) up and 
>>> running in free time, but i constantly encounter serious 
>>> problems on my way. now i have some weird problems with 
>>> COM(no COM - no DirectX).
>>>
>>> so i don't recommend anyone even try it(DirectX) now, unless 
>>> one is truly skilled with C++
>>>
>>> p.s. for working win32 with dmd 2.063.2 go there(don't forget 
>>> to convert .lib's to OMF, use coffimplib from digitalmars 
>>> ftp) - 
>>> https://github.com/AndrejMitrovic/DWinProgramming/tree/master/WindowsAPI
>>
>> What it has to do with C++?
>
> nothing. but whole win32/DirectX is either C or C++ with COM. 
> learning them will require thinking that way, while D offers 
> higher level abstraction you won't learn D with this, just 
> D'ish C/C++. it also would require basic understanding of ABI 
> interop between C/D and so on, so experience with win32/C++ 
> would help a lot if any problem encountered.

If you want to offer Direct3D in D as is (I prefer this option 
instead of wrapper-libraries), you'll have to make it COM'ish and 
C'ish :-)
I actually consider looking into this problem, I'm skilled C++ 
graphics programmer.


More information about the Digitalmars-d-learn mailing list