Anyone tried wrapping DMD with Swig?

David Nadlinger see at klickverbot.at
Wed Aug 8 23:45:01 PDT 2012


On Thursday, 9 August 2012 at 00:28:32 UTC, Andrej Mitrovic wrote:
> This is my .i file:
> https://gist.github.com/3299941
>
> I've ran:
> swig -c++ -Isrc/root -IC:\MinGW\lib\gcc\mingw32\4.6.1\include
> -IC:\MinGW\include -includeall -d -d2 dmd_all.i
>
> C:\MinGW\include\stdlib.h(96) : Error: Syntax error in input(1).
>
> Without using "-includeall" I get a lot of warnings but swig 
> doesn't
> generate a single file.

Using -includeall is almost always the wrong thing to do, 
precisely for the reason that it also pulls in system headers.

As for the »doesn't generate a single file« problem: Have you 
tried adding a »%module dmd« directive to the top of your .i 
file?

David


More information about the Digitalmars-d mailing list