Re: Using D as a shared library.

2013-05-14 Thread evilrat
On Tuesday, 14 May 2013 at 16:01:57 UTC, Jacob Carlborg wrote: ... I'm not sure if all this work yet. Using a D shared library from a D application, "statically" linked, should work on Linux 64bit. Don't know if it works from a C application. loading D libraries on non-Windows possible but al

Re: Using D as a shared library.

2013-05-14 Thread Jacob Carlborg
On 2013-05-14 15:53, Paolo & Kevin wrote: I am trying to use a D shared library with a C program. But I have a problem, the code works in a D program. But it crashes as a library. What I am doing wrong? I think there is something the D language does before starting main. And the C language do

Using D as a shared library.

2013-05-14 Thread Paolo & Kevin
I am trying to use a D shared library with a C program. But I have a problem, the code works in a D program. But it crashes as a library. Here is a minimal example. I want to make a library that returns an array of 100 integers. % ls fakemain.d function.d main.c % cat fakemain.d void main() {}