digitalmars.D - D Imports and Shared Library question
- Shammah Chancellor (10/10) Aug 21 2005 While I understand you can strip the function bodies out an get the same...
- Derek Parnell (6/15) Aug 21 2005 If its on the DMD command line it compiles it, otherwise it just reads i...
While I understand you can strip the function bodies out an get the same effect as header files in C, I don't think this was the design goal. My understanding was that you could "import" the original source directly as if it was a header file when using it to compile against a library. What I'm wondering is how the compiler decides when it needs to pay attention to, and staticly compile the function definition, and when it just needs to know what they are. So how's it do it? -Sha
Aug 21 2005
On Sun, 21 Aug 2005 07:54:28 +0000 (UTC), Shammah Chancellor wrote:While I understand you can strip the function bodies out an get the same effect as header files in C, I don't think this was the design goal. My understanding was that you could "import" the original source directly as if it was a header file when using it to compile against a library. What I'm wondering is how the compiler decides when it needs to pay attention to, and staticly compile the function definition, and when it just needs to know what they are. So how's it do it?If its on the DMD command line it compiles it, otherwise it just reads it. -- Derek Parnell Melbourne, Australia 21/08/2005 7:33:52 PM
Aug 21 2005