I made a specific yet advanced game playing AI but I want to bring it to D to make it cross platform

Rikki Cattermole via Digitalmars-d digitalmars-d at puremagic.com
Thu Dec 31 17:33:09 PST 2015


On 01/01/16 10:15 AM, Gan wrote:
> On Thursday, 31 December 2015 at 10:29:42 UTC, Rikki Cattermole wrote:
>> On 31/12/15 11:20 PM, Gan wrote:
>>> [...]
>>
>> I'll start out by saying, this is more appropriate for D.learn not the
>> main D Newsgroup.
>> What you have here is two separate issues.
>>
>> - Interacting with Objective-C which over the next few years will
>> become very easy (WIP currently). Otherwise you can interact with it
>> via extern(C).
>> - Interacting with C#. This will be a good deal harder, but still
>> do-able with the help of extern(C). You'll need to get good at
>> interacting with unmanaged code from there, which I cannot help with
>> since it is C# specific.
>>
>> One thing to remember D is a native language meaning an exe cannot be
>> ran on Linux and vice versa.
>> It won't be as simple as compiling as a shared library once and using
>> it everywhere.
>
> The shared library wouldn't be cross platform. I'd have to write one for
> each platform I target.
>
> So what I got from this is that in theory it's possible but is there a
> lack of resources about the process?

Not really.
Since you'll be going over extern(C) you won't have any trouble.
It may just be a bit big the bindings.


More information about the Digitalmars-d mailing list