DStep 1.0.0
Jacob Carlborg
doob at me.com
Sat Apr 27 08:15:11 UTC 2019
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
More information about the Digitalmars-d-announce
mailing list