On 2019-04-26 10:33, Robert M. Münch wrote:

Are there are any functional differences between the platforms?

The short answer is yes.

Or can I just use the OSX version and use the generated .d files with the DMD
Windows version too?

The longer answer is that it depends. DStep behaves the same way as the compiler (Clang in this case). That means that there are different predefined macro constants for different platforms. For example:

#if _WIN32
#include <windows.h>
DWORD foo();
#else
int foo();
#endif

If you run DStep on Windows it will output:

extern (C):

DWORD foo();

But on any other platform it will output:

extern (C):

int foo();

So it's a question if the header files contain any code like the above. The bindings that DStep uses for libclang are generated on macOS but are used unchanged on Windows and Linux as well. But these are the most forgiven headers that I've seen when it comes to create bindings.

--
/Jacob Carlborg
  • DStep 1.0.0 Jacob Carlborg via Digitalmars-d-announce
    • Re: DStep 1.0.0 Dennis via Digitalmars-d-announce
    • Re: DStep 1.0.0 Robert M. Münch via Digitalmars-d-announce
      • Re: DStep 1.0.0 Jacob Carlborg via Digitalmars-d-announce

Reply via email to