digitalmars.D - status of shared libs
- Ellery Newcomer (2/2) Apr 05 2013 is there a roadmap for druntime/phobos support of shared libraries?
- Walter Bright (3/5) Apr 05 2013 awaiting:
- Ellery Newcomer (2/8) Apr 05 2013 goody
- Jacob Carlborg (4/6) Apr 06 2013 Everything in druntime is done?
- Ellery Newcomer (7/13) Apr 06 2013 trying out the spiffy new shared lib support, I get this:
- Walter Bright (2/7) Apr 06 2013 _Dmain is the mangled name for main() in your program.
- Ellery Newcomer (3/14) Apr 07 2013 Yes, I know, but does it make sense to provide it when I call my
- Walter Bright (2/14) Apr 07 2013 Currently, I think you'll need a D main().
- Jacob Carlborg (11/12) Apr 07 2013 I don't think that's a good solution. Currently a quick workaround is to...
- Walter Bright (3/7) Apr 08 2013 That may get rid of the error message, but the issue is getting the dll
- Jacob Carlborg (5/7) Apr 08 2013 There's "rt_init", C initializers and Windows DLL main. That's why a
- Maxim Fomin (8/26) Apr 08 2013 I think there is no need for D main and it can be fixed simply by
- Maxim Fomin (5/20) Apr 07 2013 DMD inserts some additional info in object file if main() is
- Jacob Carlborg (5/9) Apr 07 2013 druntime already defines a C main function as well, which forwards to
- Maxim Fomin (6/16) Apr 08 2013 C main function need to be renamed or D main function should be
- Jacob Carlborg (7/11) Apr 08 2013 The C main function defined in druntime forward to the D main function.
- Jacob Carlborg (5/9) Apr 08 2013 Forgot the link:
- Maxim Fomin (21/34) Apr 08 2013 This is exactly why main() does not necessarily forwards to
- Jacob Carlborg (4/22) Apr 08 2013 Sure, if you redefine the C main function.
- Ellery Newcomer (6/10) Apr 08 2013 My target is python extension modules. I can't touch c main. I
- Jacob Carlborg (10/16) Apr 07 2013 It's declared in druntime and therefore expected to be included:
- Martin Nowak (2/6) Apr 07 2013 Yes, druntime should only weakly link against _Dmain.
- Rainer Schuetze (5/15) Apr 08 2013 I think the correct way is to remove the C main function from dmain2.d
- Jacob Carlborg (4/8) Apr 08 2013 The D main function as well?
- Rainer Schuetze (7/13) Apr 08 2013 Inside a DLL you don't run the D main function, and the executable must
- Martin Nowak (9/26) Apr 09 2013 I think the best way is to sythesize a main function in the executable.
- Jacob Carlborg (4/12) Apr 09 2013 By "sythesize", you mean not defined in druntime?
- Martin Nowak (4/15) Apr 10 2013 Yes as Rainer pointed out the current mechanism doesn't work well on
- Joseph Rushton Wakeling (10/18) Apr 07 2013 I see it's been added :-)
- Johannes Pfau (6/29) Apr 07 2013 In theory: Add the .so directory to /etc/ld.so.conf, run ldconfig
- Joseph Rushton Wakeling (8/12) Apr 07 2013 Oh, of course. I did once know this years ago, but I'd forgotten as it'...
- Johannes Pfau (7/25) Apr 08 2013 Then ldconfig is less picky than I thought ;-) The other problem is
- Joseph Rushton Wakeling (3/9) Apr 09 2013 Aaahh, OK. If I understand right it's a harmless warning, so I might as...
- Walter Bright (6/8) Apr 08 2013 There are the following scenarios:
- Ellery Newcomer (2/11) May 22 2013 now? :)
- 1100110 (2/16) May 22 2013 Good question, since phobos is now shared...
- Jacob Carlborg (5/10) May 22 2013 2 works. 4 could possibly work if it's statically loaded. Although I'm
- Manu (3/16) May 23 2013 Is there an ETA for any any of these? case 3 is of critical importance.....
- Jacob Carlborg (7/10) May 23 2013 I don't know. 5 would probably automatically work if 3 worked, or with
- Jakob Ovrum (6/7) May 23 2013 Hasn't pretty much all of this always worked on Windows?
- Jacob Carlborg (4/5) May 23 2013 I haven't tried it, I don't know.
- Manu (2/10) May 23 2013 They're not unimportant details.
- Manu (3/12) May 23 2013 I think there's already some pressure on the 2 of them.
is there a roadmap for druntime/phobos support of shared libraries? just built dmd from master, and I still can't coax out a 64 bit .so
Apr 05 2013
On 4/5/2013 7:18 PM, Ellery Newcomer wrote:is there a roadmap for druntime/phobos support of shared libraries? just built dmd from master, and I still can't coax out a 64 bit .soawaiting: https://github.com/D-Programming-Language/phobos/pull/1240
Apr 05 2013
On 04/05/2013 07:22 PM, Walter Bright wrote:On 4/5/2013 7:18 PM, Ellery Newcomer wrote:goodyis there a roadmap for druntime/phobos support of shared libraries? just built dmd from master, and I still can't coax out a 64 bit .soawaiting: https://github.com/D-Programming-Language/phobos/pull/1240
Apr 05 2013
On 2013-04-06 04:22, Walter Bright wrote:awaiting: https://github.com/D-Programming-Language/phobos/pull/1240Everything in druntime is done? -- /Jacob Carlborg
Apr 06 2013
On 04/05/2013 07:22 PM, Walter Bright wrote:On 4/5/2013 7:18 PM, Ellery Newcomer wrote:trying out the spiffy new shared lib support, I get this: dmd -unittest -fPIC -defaultlib=phobos2so -shared test1.d -oflibtest1.so gcc test1.c `pwd`/libtest1.so -L/usr/lib64/dmd/ -L/usr/lib/dmd/ -o test1.x /lib64/libphobos2so.so: undefined reference to `_Dmain' collect2: error: ld returned 1 exit status _Dmain? wat?is there a roadmap for druntime/phobos support of shared libraries? just built dmd from master, and I still can't coax out a 64 bit .soawaiting: https://github.com/D-Programming-Language/phobos/pull/1240
Apr 06 2013
On 4/6/2013 7:15 PM, Ellery Newcomer wrote:dmd -unittest -fPIC -defaultlib=phobos2so -shared test1.d -oflibtest1.so gcc test1.c `pwd`/libtest1.so -L/usr/lib64/dmd/ -L/usr/lib/dmd/ -o test1.x /lib64/libphobos2so.so: undefined reference to `_Dmain' collect2: error: ld returned 1 exit status _Dmain? wat?_Dmain is the mangled name for main() in your program.
Apr 06 2013
On Sunday, 7 April 2013 at 06:03:38 UTC, Walter Bright wrote:On 4/6/2013 7:15 PM, Ellery Newcomer wrote:Yes, I know, but does it make sense to provide it when I call my shared lib from C?dmd -unittest -fPIC -defaultlib=phobos2so -shared test1.d -oflibtest1.so gcc test1.c `pwd`/libtest1.so -L/usr/lib64/dmd/ -L/usr/lib/dmd/ -o test1.x /lib64/libphobos2so.so: undefined reference to `_Dmain' collect2: error: ld returned 1 exit status _Dmain? wat?_Dmain is the mangled name for main() in your program.
Apr 07 2013
On 4/7/2013 6:14 PM, Ellery Newcomer wrote:On Sunday, 7 April 2013 at 06:03:38 UTC, Walter Bright wrote:Currently, I think you'll need a D main().On 4/6/2013 7:15 PM, Ellery Newcomer wrote:Yes, I know, but does it make sense to provide it when I call my shared lib from C?dmd -unittest -fPIC -defaultlib=phobos2so -shared test1.d -oflibtest1.so gcc test1.c `pwd`/libtest1.so -L/usr/lib64/dmd/ -L/usr/lib/dmd/ -o test1.x /lib64/libphobos2so.so: undefined reference to `_Dmain' collect2: error: ld returned 1 exit status _Dmain? wat?_Dmain is the mangled name for main() in your program.
Apr 07 2013
On 2013-04-08 06:16, Walter Bright wrote:Currently, I think you'll need a D main().I don't think that's a good solution. Currently a quick workaround is to declare D main as a weak symbol. What I think could be a better choice, in the long run, is to put the C and D main functions in a separate file, compiled as its own object file. This object file will only be linked when DMD is linking an executable. The "rt_info" and D "main" functions should also be refactored so D main calls "rt_info" to avoid duplicating code. -- /Jacob Carlborg
Apr 07 2013
On 4/7/2013 11:34 PM, Jacob Carlborg wrote:On 2013-04-08 06:16, Walter Bright wrote:That may get rid of the error message, but the issue is getting the dll initialized properly.Currently, I think you'll need a D main().I don't think that's a good solution. Currently a quick workaround is to declare D main as a weak symbol.
Apr 08 2013
On 2013-04-09 01:14, Walter Bright wrote:That may get rid of the error message, but the issue is getting the dll initialized properly.There's "rt_init", C initializers and Windows DLL main. That's why a described a better solution below. -- /Jacob Carlborg
Apr 08 2013
On Monday, 8 April 2013 at 04:16:20 UTC, Walter Bright wrote:On 4/7/2013 6:14 PM, Ellery Newcomer wrote:I think there is no need for D main and it can be fixed simply by defining _Dmain() in druntime. If user defines _Dmain() somewhere in his code, it would be caught by linker, if not the behavior would depend on druntime version. Advantage is that there would be no building errors (may be except when _deh_beg and _deh_end are required), the question is what to do in default version - silently ignore or throw error.On Sunday, 7 April 2013 at 06:03:38 UTC, Walter Bright wrote:Currently, I think you'll need a D main().On 4/6/2013 7:15 PM, Ellery Newcomer wrote:Yes, I know, but does it make sense to provide it when I call my shared lib from C?dmd -unittest -fPIC -defaultlib=phobos2so -shared test1.d -oflibtest1.so gcc test1.c `pwd`/libtest1.so -L/usr/lib64/dmd/ -L/usr/lib/dmd/ -o test1.x /lib64/libphobos2so.so: undefined reference to `_Dmain' collect2: error: ld returned 1 exit status _Dmain? wat?_Dmain is the mangled name for main() in your program.
Apr 08 2013
On Monday, 8 April 2013 at 01:14:19 UTC, Ellery Newcomer wrote:On Sunday, 7 April 2013 at 06:03:38 UTC, Walter Bright wrote:DMD inserts some additional info in object file if main() is present and sometimes it is required. One of the solutions is to use dummy D module (with main function defined) which forwards startup arguments to C main function.On 4/6/2013 7:15 PM, Ellery Newcomer wrote:Yes, I know, but does it make sense to provide it when I call my shared lib from C?dmd -unittest -fPIC -defaultlib=phobos2so -shared test1.d -oflibtest1.so gcc test1.c `pwd`/libtest1.so -L/usr/lib64/dmd/ -L/usr/lib/dmd/ -o test1.x /lib64/libphobos2so.so: undefined reference to `_Dmain' collect2: error: ld returned 1 exit status _Dmain? wat?_Dmain is the mangled name for main() in your program.
Apr 07 2013
On 2013-04-08 06:35, Maxim Fomin wrote:DMD inserts some additional info in object file if main() is present and sometimes it is required. One of the solutions is to use dummy D module (with main function defined) which forwards startup arguments to C main function.druntime already defines a C main function as well, which forwards to the D main function. -- /Jacob Carlborg
Apr 07 2013
On Monday, 8 April 2013 at 06:29:33 UTC, Jacob Carlborg wrote:On 2013-04-08 06:35, Maxim Fomin wrote:C main function need to be renamed or D main function should be supplied (then a program would start from C code, not D, but this is not a problem) By the way, druntime links to _Dmain, but does not necessarily forwards to it.DMD inserts some additional info in object file if main() is present and sometimes it is required. One of the solutions is to use dummy D module (with main function defined) which forwards startup arguments to C main function.druntime already defines a C main function as well, which forwards to the D main function.
Apr 08 2013
On 2013-04-08 11:51, Maxim Fomin wrote:C main function need to be renamed or D main function should be supplied (then a program would start from C code, not D, but this is not a problem) By the way, druntime links to _Dmain, but does not necessarily forwards to it.The C main function defined in druntime forward to the D main function. The C main function calls "_d_run_main" and passes in a pointer to the D main function. "_d_run_main" then calls the d main function. Indirectly the C main forwards to D main. -- /Jacob Carlborg
Apr 08 2013
On 2013-04-08 13:21, Jacob Carlborg wrote:The C main function defined in druntime forward to the D main function. The C main function calls "_d_run_main" and passes in a pointer to the D main function. "_d_run_main" then calls the d main function. Indirectly the C main forwards to D main.Forgot the link: https://github.com/D-Programming-Language/druntime/blob/master/src/rt/dmain2.d#L348 -- /Jacob Carlborg
Apr 08 2013
On Monday, 8 April 2013 at 11:21:07 UTC, Jacob Carlborg wrote:On 2013-04-08 11:51, Maxim Fomin wrote:This is exactly why main() does not necessarily forwards to _Dmain(). import std.stdio; alias extern(C) int function(char[][] args) MainFunc; extern (C) int _d_run_main(int argc, char **argv, MainFunc mainFunc); extern(C) int main(int argc, char** argv) { return _d_run_main(argc, argv, &bar); } void main() { writeln("D main"); } extern(C) int bar(char[][] args) { writeln("bar"); return 0; } Guess what would happen.C main function need to be renamed or D main function should be supplied (then a program would start from C code, not D, but this is not a problem) By the way, druntime links to _Dmain, but does not necessarily forwards to it.The C main function defined in druntime forward to the D main function. The C main function calls "_d_run_main" and passes in a pointer to the D main function. "_d_run_main" then calls the d main function. Indirectly the C main forwards to D main.
Apr 08 2013
On 2013-04-08 14:27, Maxim Fomin wrote:This is exactly why main() does not necessarily forwards to _Dmain(). import std.stdio; alias extern(C) int function(char[][] args) MainFunc; extern (C) int _d_run_main(int argc, char **argv, MainFunc mainFunc); extern(C) int main(int argc, char** argv) { return _d_run_main(argc, argv, &bar); } void main() { writeln("D main"); } extern(C) int bar(char[][] args) { writeln("bar"); return 0; } Guess what would happen.Sure, if you redefine the C main function. -- /Jacob Carlborg
Apr 08 2013
On Monday, 8 April 2013 at 04:35:59 UTC, Maxim Fomin wrote:DMD inserts some additional info in object file if main() is present and sometimes it is required. One of the solutions is to use dummy D module (with main function defined) which forwards startup arguments to C main function.My target is python extension modules. I can't touch c main. I can provide a dummy _Dmain and then manually start up and shut down the d runtime; that's the way PyD's been doing it for the last seven years, but I think it breaks when you have more than one shared lib.
Apr 08 2013
On 2013-04-07 04:15, Ellery Newcomer wrote:trying out the spiffy new shared lib support, I get this: dmd -unittest -fPIC -defaultlib=phobos2so -shared test1.d -oflibtest1.so gcc test1.c `pwd`/libtest1.so -L/usr/lib64/dmd/ -L/usr/lib/dmd/ -o test1.x /lib64/libphobos2so.so: undefined reference to `_Dmain' collect2: error: ld returned 1 exit status _Dmain? wat?It's declared in druntime and therefore expected to be included: https://github.com/D-Programming-Language/druntime/blob/master/src/rt/dmain2.d#L348 I think it needs weak linkage or similar. I don't know if it's possible to do in D, but in C it can be done like this: https://github.com/D-Programming-Language/druntime/blob/master/src/rt/dylib_fixes.c Don't know if that is compiled and linked. There probably needs to be a way to exclude the C main function as well. -- /Jacob Carlborg
Apr 07 2013
On 04/07/2013 10:21 AM, Jacob Carlborg wrote:On 2013-04-07 04:15, Ellery Newcomer wrote: I think it needs weak linkage or similar. I don't know if it's possible to do in D, but in C it can be done like this: https://github.com/D-Programming-Language/druntime/blob/master/src/rt/dylib_fixes.cYes, druntime should only weakly link against _Dmain.
Apr 07 2013
On 07.04.2013 17:19, Martin Nowak wrote:On 04/07/2013 10:21 AM, Jacob Carlborg wrote:I think the correct way is to remove the C main function from dmain2.d and put it in an extra library to be linked with the executable. At least on Windows, you won't be able to link back from the DLL to the main executable.On 2013-04-07 04:15, Ellery Newcomer wrote: I think it needs weak linkage or similar. I don't know if it's possible to do in D, but in C it can be done like this: https://github.com/D-Programming-Language/druntime/blob/master/src/rt/dylib_fixes.cYes, druntime should only weakly link against _Dmain.
Apr 08 2013
On 2013-04-08 20:00, Rainer Schuetze wrote:I think the correct way is to remove the C main function from dmain2.d and put it in an extra library to be linked with the executable. At least on Windows, you won't be able to link back from the DLL to the main executable.The D main function as well? -- /Jacob Carlborg
Apr 08 2013
On 08.04.2013 20:54, Jacob Carlborg wrote:On 2013-04-08 20:00, Rainer Schuetze wrote:Inside a DLL you don't run the D main function, and the executable must have it (or WinMain), so it doesn't make sense to define one in the shared druntime DLL. Depending on whether _Dmain, WinMain or DLLMain is found in the D source code, the corresponding startup code is linked, and only the startup code for _Dmain drags in the the C main function.I think the correct way is to remove the C main function from dmain2.d and put it in an extra library to be linked with the executable. At least on Windows, you won't be able to link back from the DLL to the main executable.The D main function as well?
Apr 08 2013
On 04/08/2013 08:00 PM, Rainer Schuetze wrote:On 07.04.2013 17:19, Martin Nowak wrote:I think the best way is to sythesize a main function in the executable. Something like this. extern(C) int main(int argc, char** argv) { rt_init(argc, argv); runMain(&_Dmain); return rt_term(); }On 04/07/2013 10:21 AM, Jacob Carlborg wrote:I think the correct way is to remove the C main function from dmain2.d and put it in an extra library to be linked with the executable. At least on Windows, you won't be able to link back from the DLL to the main executable.On 2013-04-07 04:15, Ellery Newcomer wrote: I think it needs weak linkage or similar. I don't know if it's possible to do in D, but in C it can be done like this: https://github.com/D-Programming-Language/druntime/blob/master/src/rt/dylib_fixes.cYes, druntime should only weakly link against _Dmain.
Apr 09 2013
On 2013-04-09 17:51, Martin Nowak wrote:I think the best way is to sythesize a main function in the executable. Something like this. extern(C) int main(int argc, char** argv) { rt_init(argc, argv); runMain(&_Dmain); return rt_term(); }By "sythesize", you mean not defined in druntime? -- /Jacob Carlborg
Apr 09 2013
On 04/09/2013 06:49 PM, Jacob Carlborg wrote:On 2013-04-09 17:51, Martin Nowak wrote:Yes as Rainer pointed out the current mechanism doesn't work well on Windows. Given the simplicity of the needed C function we can simply generate it inside the compiler.I think the best way is to sythesize a main function in the executable. Something like this. extern(C) int main(int argc, char** argv) { rt_init(argc, argv); runMain(&_Dmain); return rt_term(); }By "sythesize", you mean not defined in druntime?
Apr 10 2013
On 04/06/2013 04:22 AM, Walter Bright wrote:On 4/5/2013 7:18 PM, Ellery Newcomer wrote:I see it's been added :-) Are there any extra flags that need to be added to dmd.conf for this to work successfully? On my system I find that the shared library is not found when running programs built against it: error while loading shared libraries: libphobos2so.so: cannot load shared object file: no such file or directory I can get round this by exporting /opt/dmd/lib to LD_LIBRARY_PATH but if I recall right, this is a frowned-upon way of identifying where shared libraries are to be found ...is there a roadmap for druntime/phobos support of shared libraries? just built dmd from master, and I still can't coax out a 64 bit .soawaiting: https://github.com/D-Programming-Language/phobos/pull/1240
Apr 07 2013
Am Sun, 07 Apr 2013 18:36:04 +0200 schrieb Joseph Rushton Wakeling <joseph.wakeling webdrake.net>:On 04/06/2013 04:22 AM, Walter Bright wrote:In theory: Add the .so directory to /etc/ld.so.conf, run ldconfig http://linux.die.net/man/8/ldconfig But: This usually requires proper version information in the .so library and a properly set soname. I doubt anyone has looked into that yet.On 4/5/2013 7:18 PM, Ellery Newcomer wrote:I see it's been added :-) Are there any extra flags that need to be added to dmd.conf for this to work successfully? On my system I find that the shared library is not found when running programs built against it: error while loading shared libraries: libphobos2so.so: cannot load shared object file: no such file or directory I can get round this by exporting /opt/dmd/lib to LD_LIBRARY_PATH but if I recall right, this is a frowned-upon way of identifying where shared libraries are to be found ...is there a roadmap for druntime/phobos support of shared libraries? just built dmd from master, and I still can't coax out a 64 bit .soawaiting: https://github.com/D-Programming-Language/phobos/pull/1240
Apr 07 2013
On 04/07/2013 07:38 PM, Johannes Pfau wrote:In theory: Add the .so directory to /etc/ld.so.conf, run ldconfig http://linux.die.net/man/8/ldconfigOh, of course. I did once know this years ago, but I'd forgotten as it's so long since I last installed a shared library into anything other than /usr/local/lib.But: This usually requires proper version information in the .so library and a properly set soname. I doubt anyone has looked into that yet.Well, I have had no problems with dmd, but when I tried also adding /opt/gdc/lib I got the following error message upon running ldconfig: /sbin/ldconfig.real: /opt/gdc/lib/libstdc++.so.6.0.18-gdb.py is not an ELF file - it has the wrong magic bytes at the start.
Apr 07 2013
Am Sun, 07 Apr 2013 19:56:15 +0200 schrieb Joseph Rushton Wakeling <joseph.wakeling webdrake.net>:On 04/07/2013 07:38 PM, Johannes Pfau wrote:Then ldconfig is less picky than I thought ;-) The other problem is actually a problem in gcc, not gdc specific: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41816 Most linux distributions move that file manually to a different location when creating the gcc package.In theory: Add the .so directory to /etc/ld.so.conf, run ldconfig http://linux.die.net/man/8/ldconfigOh, of course. I did once know this years ago, but I'd forgotten as it's so long since I last installed a shared library into anything other than /usr/local/lib.But: This usually requires proper version information in the .so library and a properly set soname. I doubt anyone has looked into that yet.Well, I have had no problems with dmd, but when I tried also adding /opt/gdc/lib I got the following error message upon running ldconfig: /sbin/ldconfig.real: /opt/gdc/lib/libstdc++.so.6.0.18-gdb.py is not an ELF file - it has the wrong magic bytes at the start.
Apr 08 2013
On 04/08/2013 10:25 AM, Johannes Pfau wrote:Then ldconfig is less picky than I thought ;-) The other problem is actually a problem in gcc, not gdc specific: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41816 Most linux distributions move that file manually to a different location when creating the gcc package.Aaahh, OK. If I understand right it's a harmless warning, so I might as well just leave everything where it is ...
Apr 09 2013
On 4/5/2013 7:18 PM, Ellery Newcomer wrote:is there a roadmap for druntime/phobos support of shared libraries? just built dmd from master, and I still can't coax out a 64 bit .soThere are the following scenarios: 1. D executable, C dll => always worked 2. D executable, D dll, statically loaded => now in 2.063 HEAD 3. D executable, D dll, dynamically loaded (hot swapping) = not yet 4. C executable, D dll => not yet
Apr 08 2013
On 04/08/2013 04:18 PM, Walter Bright wrote:On 4/5/2013 7:18 PM, Ellery Newcomer wrote:now? :)is there a roadmap for druntime/phobos support of shared libraries? just built dmd from master, and I still can't coax out a 64 bit .soThere are the following scenarios: 1. D executable, C dll => always worked 2. D executable, D dll, statically loaded => now in 2.063 HEAD 3. D executable, D dll, dynamically loaded (hot swapping) = not yet 4. C executable, D dll => not yet
May 22 2013
On 05/22/2013 08:01 PM, Ellery Newcomer wrote:On 04/08/2013 04:18 PM, Walter Bright wrote:Good question, since phobos is now shared...On 4/5/2013 7:18 PM, Ellery Newcomer wrote:=20 now? :)is there a roadmap for druntime/phobos support of shared libraries? just built dmd from master, and I still can't coax out a 64 bit .soThere are the following scenarios: 1. D executable, C dll =3D> always worked 2. D executable, D dll, statically loaded =3D> now in 2.063 HEAD 3. D executable, D dll, dynamically loaded (hot swapping) =3D not yet 4. C executable, D dll =3D> not yet
May 22 2013
On 2013-05-23 03:01, Ellery Newcomer wrote:2 works. 4 could possibly work if it's statically loaded. Although I'm not sure if the runtime will be properly initialized from C. -- /Jacob Carlborg1. D executable, C dll => always worked 2. D executable, D dll, statically loaded => now in 2.063 HEAD 3. D executable, D dll, dynamically loaded (hot swapping) = not yet 4. C executable, D dll => not yetnow? :)
May 22 2013
On 23 May 2013 16:28, Jacob Carlborg <doob me.com> wrote:On 2013-05-23 03:01, Ellery Newcomer wrote: 1. D executable, C dll => always workedIs there an ETA for any any of these? case 3 is of critical importance... and also 5. C executable, D dll, dynamically loaded (hot swapping)2 works. 4 could possibly work if it's statically loaded. Although I'm not sure if the runtime will be properly initialized from C. -- /Jacob Carlborg2. D executable, D dll, statically loaded => now in 2.063 HEAD 3. D executable, D dll, dynamically loaded (hot swapping) = not yet 4. C executable, D dll => not yetnow? :)
May 23 2013
On 2013-05-23 12:33, Manu wrote:Is there an ETA for any any of these? case 3 is of critical importance... and also 5. C executable, D dll, dynamically loaded (hot swapping)I don't know. 5 would probably automatically work if 3 worked, or with minor modifications. As for the ETA, I don't know. See if you can put some pressure Walter or Martin Nowak. I'm talking about Linux and possibly FreeBSD here. Don't know the status on Windows. -- /Jacob Carlborg
May 23 2013
On Thursday, 23 May 2013 at 11:45:41 UTC, Jacob Carlborg wrote:Don't know the status on Windows.Hasn't pretty much all of this always worked on Windows? I've been using DLLs written in D on Windows for years, including in situations where they are loaded by a C application. It had its issues when it came to sharing TypeInfo and GC instances and whatnot, but it works.
May 23 2013
On 2013-05-23 13:57, Jakob Ovrum wrote:Hasn't pretty much all of this always worked on Windows?I haven't tried it, I don't know. -- /Jacob Carlborg
May 23 2013
On 23 May 2013 21:57, Jakob Ovrum <jakobovrum gmail.com> wrote:On Thursday, 23 May 2013 at 11:45:41 UTC, Jacob Carlborg wrote:They're not unimportant details.Don't know the status on Windows.Hasn't pretty much all of this always worked on Windows? I've been using DLLs written in D on Windows for years, including in situations where they are loaded by a C application. It had its issues when it came to sharing TypeInfo and GC instances and whatnot, but it works.
May 23 2013
On 23 May 2013 21:45, Jacob Carlborg <doob me.com> wrote:On 2013-05-23 12:33, Manu wrote: Is there an ETA for any any of these? case 3 is of criticalI think there's already some pressure on the 2 of them. It's been a major roadblock for a long time for us.importance... and also 5. C executable, D dll, dynamically loaded (hot swapping)I don't know. 5 would probably automatically work if 3 worked, or with minor modifications. As for the ETA, I don't know. See if you can put some pressure Walter or Martin Nowak. I'm talking about Linux and possibly FreeBSD here. Don't know the status on Windows.
May 23 2013