digitalmars.D.learn - Looking for instructions on how to make a Derelict library
- Matt Jones (7/7) Sep 17 2017 Hey everyone,
- Mike Parker (13/20) Sep 17 2017 Just look at the existing Derelict packages. For a normal C
- Matt Jones (4/6) Sep 17 2017 I've been reading the DerelictSDL2 source code. I think I have a
- jmh530 (4/7) Sep 18 2017 Might be interesting to write up your experience with doing it as
- Mike Parker (3/14) Sep 18 2017 I used to have a guide to creating "Derelictified" bindings for
- SrMordred (1/3) Sep 18 2017 +1
- Matt Jones (4/15) Sep 18 2017 I was thinking of doing that. I'll have to figure out the best
Hey everyone, I wanted to make a version of SQlite3 that uses Derelict to load the sqlite3 DLL when I'm ready. I can't find any instructions for how to make a basic Derelict style library. I looked around at http://derelictorg.github.io/, but could not find anything. Does anyone have any? Thanks.
Sep 17 2017
On Sunday, 17 September 2017 at 21:15:08 UTC, Matt Jones wrote:Hey everyone, I wanted to make a version of SQlite3 that uses Derelict to load the sqlite3 DLL when I'm ready. I can't find any instructions for how to make a basic Derelict style library. I looked around at http://derelictorg.github.io/, but could not find anything. Does anyone have any? Thanks.Just look at the existing Derelict packages. For a normal C library like sqlite3, it's pretty straightforward -- declare function pointers to ever public function in the API, translate all the types, convert any macros to D functions, and create a loader that extends derelict.util.SharedLibLoader and overrides loadSymbols. Examples: DerelictLua, DerelictODE, DerelictFT. You can also add support for static bindings by versioning out the function declarations and the loader in favor or normal function declarations. Examples: DerelictSDL2, DerelictGLFW3, DerelictAL. See the D wiki for links to articles that show how to translate C headers.
Sep 17 2017
On Monday, 18 September 2017 at 00:21:23 UTC, Mike Parker wrote:See the D wiki for links to articles that show how to translate C headers.I've been reading the DerelictSDL2 source code. I think I have a handle on it. I'll have to look more at the wiki too. Thanks.
Sep 17 2017
On Monday, 18 September 2017 at 00:33:25 UTC, Matt Jones wrote:I've been reading the DerelictSDL2 source code. I think I have a handle on it. I'll have to look more at the wiki too. Thanks.Might be interesting to write up your experience with doing it as either blog post or part of the Derelict documentation (which is already quite good, IMO).
Sep 18 2017
On Monday, 18 September 2017 at 11:27:01 UTC, jmh530 wrote:On Monday, 18 September 2017 at 00:33:25 UTC, Matt Jones wrote:I used to have a guide to creating "Derelictified" bindings for an older version. I should write one up for the current version.I've been reading the DerelictSDL2 source code. I think I have a handle on it. I'll have to look more at the wiki too. Thanks.Might be interesting to write up your experience with doing it as either blog post or part of the Derelict documentation (which is already quite good, IMO).
Sep 18 2017
I used to have a guide to creating "Derelictified" bindings for an older version. I should write one up for the current version.+1
Sep 18 2017
On Monday, 18 September 2017 at 11:27:01 UTC, jmh530 wrote:On Monday, 18 September 2017 at 00:33:25 UTC, Matt Jones wrote:I was thinking of doing that. I'll have to figure out the best way to do that, once I get a better understanding of how Derelict works.I've been reading the DerelictSDL2 source code. I think I have a handle on it. I'll have to look more at the wiki too. Thanks.Might be interesting to write up your experience with doing it as either blog post or part of the Derelict documentation (which is already quite good, IMO).
Sep 18 2017