digitalmars.D - ImportC, Dub and Static inline
- Sergey (2/2) Feb 22 Any automatic way to make C library with "static inline"
- Anton Pastukhov (4/6) Mar 05 Also curious. Tried it with Chipmunk2D, but it won't work without
- libxmoc (2/4) Mar 05 Have you tried "sourceLibrary" target type as workaround?
- Serg Gini (7/11) Mar 06 Yes, and cSourceLibrary.
- Jean-Philippe (6/18) Mar 09 Yes, that makes sense. If the methods aren’t exposed in the final
Any automatic way to make C library with "static inline" functions working automatically within dub library?
Feb 22
On Sunday, 22 February 2026 at 22:37:13 UTC, Sergey wrote:Any automatic way to make C library with "static inline" functions working automatically within dub library?Also curious. Tried it with Chipmunk2D, but it won't work without special massage, which feels like... writing bindings. The thing ImportC is ought to solve
Mar 05
On Sunday, 22 February 2026 at 22:37:13 UTC, Sergey wrote:Any automatic way to make C library with "static inline" functions working automatically within dub library?Have you tried "sourceLibrary" target type as workaround?
Mar 05
On Thursday, 5 March 2026 at 19:07:05 UTC, libxmoc wrote:On Sunday, 22 February 2026 at 22:37:13 UTC, Sergey wrote:Yes, and cSourceLibrary. The issue is that in the final .so/.dylib such methods are not presented For my case I had to do this semi-manually now: I've extracted all such functions and run `ctod` for them and then fix some small parts manually.Any automatic way to make C library with "static inline" functions working automatically within dub library?Have you tried "sourceLibrary" target type as workaround?
Mar 06
On Friday, 6 March 2026 at 08:48:43 UTC, Serg Gini wrote:On Thursday, 5 March 2026 at 19:07:05 UTC, libxmoc wrote:Yes, that makes sense. If the methods aren’t exposed in the final .so/.dylib, handling them semi-manually is often the only practical workaround. Extracting the functions, running ctod, and then fixing the remaining parts manually sounds like a reasonable approach for now.On Sunday, 22 February 2026 at 22:37:13 UTC, Sergey wrote:Yes, and cSourceLibrary. The issue is that in the final .so/.dylib such methods are not presented For my case I had to do this semi-manually now: I've extracted all such functions and run `ctod` for them and then fix some small parts manually.Any automatic way to make C library with "static inline" functions working automatically within dub library?Have you tried "sourceLibrary" target type as workaround?
Mar 09









Anton Pastukhov <mail anton9.com> 