D - Distributing binary D libraries without source code
- Damon Gray (12/12) Jan 05 2004 I'm probably missing something obvious. But I've read through the docume...
- Matthew (13/25) Jan 05 2004 Just strip out the function definitions, leaving the declarations in the...
- J Anderson (7/11) Jan 05 2004 Me to, if not in the compiler, a tool that comes with the compiler. The...
- Matthew (6/19) Jan 06 2004 there.
- J Anderson (8/41) Jan 06 2004 I suppose the advantage of having it in the compiler is that you would
- J C Calvarese (10/29) Jan 06 2004 It doesn't quite work these days, but strip.d in dig tries to strip D
- Marco A (3/33) Jan 06 2004 the Eiffel folks have a utility called "short" that does this type of th...
- Andy Friesen (10/25) Jan 05 2004 You just need to remove the function bodies in the source, and
I'm probably missing something obvious. But I've read through the documentation and I can't understand how you would distribute a binary library for a D module without giving out it's source. For example, lets say I wanted to release a module that does some nifty text manipulations, lets call it module text.nifty; and the file is nifty.d. I compile this and want to create a libnifty.a. So I do that. Then it seems to me if I want anyone to be able to use libnifty in their project I have to also give them nifty.d source file. Is this correct? Maybe I just can't get past my C eyes. :) To do this with C I would make the library and send it out with a .h file and they would get the definitions from that. Thanks for helping this new D explorer.
Jan 05 2004
Just strip out the function definitions, leaving the declarations in there. This is something I'm hoping we can oblige Walter to include in the compiler, so if you add your voice to the heaving masses ... "Damon Gray" <Damon_member pathlink.com> wrote in message news:btcrqu$14du$1 digitaldaemon.com...I'm probably missing something obvious. But I've read through thedocumentationand I can't understand how you would distribute a binary library for a Dmodulewithout giving out it's source. For example, lets say I wanted to releaseamodule that does some nifty text manipulations, lets call it moduletext.nifty;and the file is nifty.d. I compile this and want to create a libnifty.a.So I dothat. Then it seems to me if I want anyone to be able to use libnifty intheirproject I have to also give them nifty.d source file. Is this correct? Maybe I just can't get past my C eyes. :) To do this with C I would makethelibrary and send it out with a .h file and they would get the definitionsfromthat. Thanks for helping this new D explorer.
Jan 05 2004
Matthew wrote:Just strip out the function definitions, leaving the declarations in there. This is something I'm hoping we can oblige Walter to include in the compiler, so if you add your voice to the heaving masses ...Me to, if not in the compiler, a tool that comes with the compiler. The sooner the "header" format is standardised, the better the chance of it being used for things like intellisense in editors. In the mean time you could use doxygen (I'm not implying that the declaration format standard should be anything as complex as doxygen). Anderson
Jan 05 2004
"J Anderson" <REMOVEanderson badmama.com.au> wrote in message news:btdggh$248n$1 digitaldaemon.com...Matthew wrote:there.Just strip out the function definitions, leaving the declarations inIndeed. This'd be easy to do. Someone with some time should have a go. I'm sure Walter would give the appropriate pointers.This is something I'm hoping we can oblige Walter to include in the compiler, so if you add your voice to the heaving masses ...Me to, if not in the compiler, a tool that comes with the compiler. The sooner the "header" format is standardised, the better the chance of it being used for things like intellisense in editors.In the mean time you could use doxygen (I'm not implying that the declaration format standard should be anything as complex as doxygen).I always Doxygenate my libs, but it's not used for Intellisense or anything.
Jan 06 2004
inline Matthew wrote:"J Anderson" <REMOVEanderson badmama.com.au> wrote in message news:btdggh$248n$1 digitaldaemon.com...I suppose the advantage of having it in the compiler is that you would need to pharse the code less and it would be update tollerent.Matthew wrote:there.Just strip out the function definitions, leaving the declarations inIndeed. This'd be easy to do. Someone with some time should have a go. I'm sure Walter would give the appropriate pointers.This is something I'm hoping we can oblige Walter to include in the compiler, so if you add your voice to the heaving masses ...Me to, if not in the compiler, a tool that comes with the compiler. The sooner the "header" format is standardised, the better the chance of it being used for things like intellisense in editors.Actually this part was meant for Damon (I forgot to say that). I know you use doxygen. Personally for something like intellisense, appart from performace issues, doxygen would be overkill. AndersonIn the mean time you could use doxygen (I'm not implying that the declaration format standard should be anything as complex as doxygen).I always Doxygenate my libs, but it's not used for Intellisense or anything.
Jan 06 2004
J Anderson wrote:Matthew wrote:It doesn't quite work these days, but strip.d in dig tries to strip D sources. (Fortunately, strip.d doesn't depend on the rest of dig, since dig stopped compiling again with the advent of DMD 0.77.) It compiles (and it somewhat works). It might be easier to correct strip.d than to create a new program. Anyways, I've attached the code for everyone's consideration. -- Justin http://jcc_7.tripod.com/d/Just strip out the function definitions, leaving the declarations in there. This is something I'm hoping we can oblige Walter to include in the compiler, so if you add your voice to the heaving masses ...Me to, if not in the compiler, a tool that comes with the compiler. The sooner the "header" format is standardised, the better the chance of it being used for things like intellisense in editors. In the mean time you could use doxygen (I'm not implying that the declaration format standard should be anything as complex as doxygen). Anderson
Jan 06 2004
the Eiffel folks have a utility called "short" that does this type of thing since it is also a single source file language per "module/class" In article <btct3d$16b9$2 digitaldaemon.com>, Matthew says...Just strip out the function definitions, leaving the declarations in there. This is something I'm hoping we can oblige Walter to include in the compiler, so if you add your voice to the heaving masses ... "Damon Gray" <Damon_member pathlink.com> wrote in message news:btcrqu$14du$1 digitaldaemon.com...I'm probably missing something obvious. But I've read through thedocumentationand I can't understand how you would distribute a binary library for a Dmodulewithout giving out it's source. For example, lets say I wanted to releaseamodule that does some nifty text manipulations, lets call it moduletext.nifty;and the file is nifty.d. I compile this and want to create a libnifty.a.So I dothat. Then it seems to me if I want anyone to be able to use libnifty intheirproject I have to also give them nifty.d source file. Is this correct? Maybe I just can't get past my C eyes. :) To do this with C I would makethelibrary and send it out with a .h file and they would get the definitionsfromthat. Thanks for helping this new D explorer.
Jan 06 2004
Damon Gray wrote:I'm probably missing something obvious. But I've read through the documentation and I can't understand how you would distribute a binary library for a D module without giving out it's source. For example, lets say I wanted to release a module that does some nifty text manipulations, lets call it module text.nifty; and the file is nifty.d. I compile this and want to create a libnifty.a. So I do that. Then it seems to me if I want anyone to be able to use libnifty in their project I have to also give them nifty.d source file. Is this correct? Maybe I just can't get past my C eyes. :) To do this with C I would make the library and send it out with a .h file and they would get the definitions from that. Thanks for helping this new D explorer.You just need to remove the function bodies in the source, and distribute that. ie class A { void B(); } void C(); digc does this automatically, I believe. (don't quote me on that) -- andy
Jan 05 2004