atilaneves / dpp

Directly include C headers in D source code
Boost Software License 1.0
230 stars 31 forks source link

Reporting Success and errors :) #207

Open SrMordred opened 4 years ago

SrMordred commented 4 years ago

( Windows 10 x64 , ldc --v 1.18.0 )

1) Just to report that I was able to make a D+SDL2+BGFX hello world using DPP to create the bidings o/

2) Things that didn´t translate: 1 - no stdint.h? UINT32_C UINT64_C etc macros fail to translate. 2 - macros that use multiple lines like

#define SDL_INIT_EVERYTHING ( \
                SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO | SDL_INIT_EVENTS | \
                SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER | SDL_INIT_SENSOR \
            )

I also needed to include SDL_syswm.h for some functions, and got lots of duplicated structs. Since SDL_syswm.h includes anothers files the translated result is huge and I didnt go deep searching the problem. Since it includes libc functions (like in SDL_stdinc.h) , maybe the problem is there somehow (don´t really know )

atilaneves commented 4 years ago

The multiple line macro thing was fixed in #186. The latest version has the fix. I opened #208 to track the stdint issue. Thanks!

SrMordred commented 4 years ago

The multiple line macro thing was fixed in #186.

Not on Windows :P https://github.com/atilaneves/dpp/commit/7399e93ca2138ab0fcdc1b98d679c841994d7def

atilaneves commented 4 years ago

Ugh. I didn't see that.