digitalmars.D - dlls
- aelmetwaly (10/10) Oct 18 2004 I once asked this question earlier but I didn't get any responce so I'll
- John Reimer (8/21) Oct 18 2004 Question #1: I'm not sure about this one. It's probably done manually
- teqDruid (8/32) Oct 18 2004 As I understand it, the reason it's not there is not that it's a fancy
- John Reimer (10/25) Oct 18 2004 Well, yes, I forgot to mention the availability of tools such as digc
I once asked this question earlier but I didn't get any responce so I'll echo it here: = How to export a class in a dll ? = To hide the implementation, we use a file containing the declaration of the exported symbols. Is this a header file with .d extension? couldn't the D compiler emit a file with these exports during compiling, which can be used as an import with dll clients?
Oct 18 2004
aelmetwaly wrote:I once asked this question earlier but I didn't get any responce so I'll echo it here: = How to export a class in a dll ? = To hide the implementation, we use a file containing the declaration of the exported symbols. Is this a header file with .d extension? couldn't the D compiler emit a file with these exports during compiling, which can be used as an import with dll clients?by returning a class object pointer using one of your exported dll functions. And, yes, the compiler could be programmed to emit such a file. But, as I understand it, doing such would constitute a fancy feature. Fancy features such as that aren't currently a priority. Bug fixes are.
Oct 18 2004
On Mon, 18 Oct 2004 09:21:14 -0700, John Reimer wrote:aelmetwaly wrote:As I understand it, the reason it's not there is not that it's a fancy feature, but that it's not something a compiler should be doing. A compiler should only be compiling. DMD is meant to be used as a small tool in a larger collection. Whatever program you're using to invoke DMD should do it. dmake and/or some component of dig might do this, but I haven't played with either of them JohnI once asked this question earlier but I didn't get any responce so I'll echo it here: = How to export a class in a dll ? = To hide the implementation, we use a file containing the declaration of the exported symbols. Is this a header file with .d extension? couldn't the D compiler emit a file with these exports during compiling, which can be used as an import with dll clients?by returning a class object pointer using one of your exported dll functions. And, yes, the compiler could be programmed to emit such a file. But, as I understand it, doing such would constitute a fancy feature. Fancy features such as that aren't currently a priority. Bug fixes are.
Oct 18 2004
teqDruid wrote:Well, yes, I forgot to mention the availability of tools such as digc and dmake that function as compiler aids (albeit for slightly different purposes). But, my point was, some people like features like this in the compiler, much like the ability to generate map files, ouput disassembly, or combine the compile and link steps into one. Such things might constitute "fancy" as well. I guess the compiler designer decides what features should be relegated to external tools. Personally , I'd find a stripping feature a useful part of the compiler output. But yes, it can be done just as effectively by an external tool.And, yes, the compiler could be programmed to emit such a file. But, as I understand it, doing such would constitute a fancy feature. Fancy features such as that aren't currently a priority. Bug fixes are.As I understand it, the reason it's not there is not that it's a fancy feature, but that it's not something a compiler should be doing. A compiler should only be compiling. DMD is meant to be used as a small tool in a larger collection. Whatever program you're using to invoke DMD should do it. dmake and/or some component of dig might do this, but I haven't played with either of them John
Oct 18 2004