Thread overview | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
June 07, 2004 Request: How to convert to library? | ||||
---|---|---|---|---|
| ||||
I have 94 D files that I'd like to convert to a library, since it's a pain for others to compile all that. Can someone please guide me through the process of how this works? Also, are there any tools out there to strip the implementation from each class (for those who need just the declarations stubs) ? Thanks much ... |
June 07, 2004 Re: Request: How to convert to library? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Kris | Kris schrieb:
> I have 94 D files that I'd like to convert to a library, since it's a pain
> for others to compile all that. Can someone please guide me through the
> process of how this works? Also, are there any tools out there to strip the
> implementation from each class (for those who need just the declarations
> stubs) ?
>
> Thanks much ...
I liked how DIG made its installation. It is distributed with full source. Then there is a batch file which compiles the compiler driver, digc, and makes digc compile the library, strip it of implementation (optionally), and puts the result into the DMD tree.
A recent vesion of DIG ist "unDig" at dsource.
-eye
|
June 07, 2004 Re: Request: How to convert to library? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Kris | Kris wrote: >I have 94 D files that I'd like to convert to a library, since it's a pain >for others to compile all that. Can someone please guide me through the >process of how this works? Also, are there any tools out there to strip the >implementation from each class (for those who need just the declarations >stubs) ? > >Thanks much ... > > There's dig as llya suggested but if possible it is much more preferable to use doxygen, even if you haven't done the documentation in the right format. Although the comments may need a little tweaking to get doxygen to work correctly with it (such as telling doxygen to ignore parts of the code). -- -Anderson: http://badmama.com.au/~anderson/ |
June 07, 2004 Re: Request: How to convert to library? | ||||
---|---|---|---|---|
| ||||
Posted in reply to J Anderson | Using doxygen is a fine idea. However, it barfs over all kinds of things 'D', such as nested classes/functions; and there's some D sysntax that causes it to ignore all following methods and classes within a module ... Thanks though; - Kris "J Anderson" <REMOVEanderson@badmama.com.au> wrote in message news:ca1g22$2epm$1@digitaldaemon.com... > Kris wrote: > > >I have 94 D files that I'd like to convert to a library, since it's a pain > >for others to compile all that. Can someone please guide me through the process of how this works? Also, are there any tools out there to strip the > >implementation from each class (for those who need just the declarations > >stubs) ? > > > >Thanks much ... > > > > > There's dig as llya suggested but if possible it is much more preferable to use doxygen, even if you haven't done the documentation in the right format. Although the comments may need a little tweaking to get doxygen to work correctly with it (such as telling doxygen to ignore parts of the code). > > -- > -Anderson: http://badmama.com.au/~anderson/ |
June 07, 2004 Re: Request: How to convert to library? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ilya Minkov | Cheers Ilya; I'll give that a try. - Kris "Ilya Minkov" <minkov@cs.tum.edu> wrote in message news:ca1eeh$2bt5$2@digitaldaemon.com... > Kris schrieb: > > > I have 94 D files that I'd like to convert to a library, since it's a pain > > for others to compile all that. Can someone please guide me through the process of how this works? Also, are there any tools out there to strip the > > implementation from each class (for those who need just the declarations > > stubs) ? > > > > Thanks much ... > > I liked how DIG made its installation. It is distributed with full source. Then there is a batch file which compiles the compiler driver, digc, and makes digc compile the library, strip it of implementation (optionally), and puts the result into the DMD tree. > > A recent vesion of DIG ist "unDig" at dsource. > > -eye |
June 07, 2004 Re: Request: How to convert to library? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Kris | Kris wrote: > I have 94 D files that I'd like to convert to a library, since it's a pain > for others to compile all that. Can someone please guide me through the > process of how this works? You'd probably want to use the Digital Mars LIB program: http://www.digitalmars.com/ctg/lib.html dmd mod1.d mod2.d mod3.d mod4.d -c lib -c mylib.lib mod1.obj mod2.obj mod3.obj mod4.obj This creates a library named mylib.lib. -- Justin (a/k/a jcc7) http://jcc_7.tripod.com/d/ |
June 07, 2004 Re: Request: How to convert to library? | ||||
---|---|---|---|---|
| ||||
Posted in reply to J C Calvarese | Thanks JCC; that looks straightforward! Do you know of some other method to strip implementation out of modules, so there's just the stubs left? Not that I'm against distributing source or anything, but sometimes it's just more convenient to have the stubs instead (otherwise, there's not much benefit over compiling the whole thing to begin with :-) "J C Calvarese" <jcc7@cox.net> wrote in message news:ca2bjt$o1f$1@digitaldaemon.com... > Kris wrote: > > I have 94 D files that I'd like to convert to a library, since it's a pain > > for others to compile all that. Can someone please guide me through the process of how this works? > > You'd probably want to use the Digital Mars LIB program: http://www.digitalmars.com/ctg/lib.html > > dmd mod1.d mod2.d mod3.d mod4.d -c > lib -c mylib.lib mod1.obj mod2.obj mod3.obj mod4.obj > > This creates a library named mylib.lib. > > > -- > Justin (a/k/a jcc7) > http://jcc_7.tripod.com/d/ |
June 07, 2004 Re: Request: How to convert to library? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Kris | Kris wrote: > Thanks JCC; that looks straightforward! > > Do you know of some other method to strip implementation out of modules, so > there's just the stubs left? Not that I'm against distributing source or > anything, but sometimes it's just more convenient to have the stubs instead > (otherwise, there's not much benefit over compiling the whole thing to begin > with :-) The strip.d code in DIG is the best I know of, but it doesn't work in all cases. Particular rough spots include things that have changed to D since Burton's last release. WYSIWYG strings used to be 'someString' and now they're `someString` or r"someString". Well, IIRC, there are 3 different functions that have to be adjusted to fix this. I'm sure it can be improved, but whenever I look at it my head starts to hurt. For example, it uses all kinds of pointer tricks for manipulating strings. I'm sure it makes sense for someone who's used to C/C++, but it just seems like a very un-D way of doing things to me. > "J C Calvarese" <jcc7@cox.net> wrote in message > news:ca2bjt$o1f$1@digitaldaemon.com... > >>Kris wrote: >> >>>I have 94 D files that I'd like to convert to a library, since it's a > > pain > >>>for others to compile all that. Can someone please guide me through the >>>process of how this works? >> >>You'd probably want to use the Digital Mars LIB program: >>http://www.digitalmars.com/ctg/lib.html >> >>dmd mod1.d mod2.d mod3.d mod4.d -c >>lib -c mylib.lib mod1.obj mod2.obj mod3.obj mod4.obj >> >>This creates a library named mylib.lib. >> >> >>-- >>Justin (a/k/a jcc7) >>http://jcc_7.tripod.com/d/ > > > -- Justin (a/k/a jcc7) http://jcc_7.tripod.com/d/ |
June 07, 2004 Re: Request: How to convert to library? | ||||
---|---|---|---|---|
| ||||
Posted in reply to J C Calvarese | J C Calvarese wrote: > Kris wrote: > >> Thanks JCC; that looks straightforward! >> >> Do you know of some other method to strip implementation out of modules, so >> there's just the stubs left? Not that I'm against distributing source or >> anything, but sometimes it's just more convenient to have the stubs instead >> (otherwise, there's not much benefit over compiling the whole thing to begin >> with :-) > > > The strip.d code in DIG is the best I know of, but it doesn't work in all cases. Particular rough spots include things that have changed to D since Burton's last release. WYSIWYG strings used to be 'someString' and now they're `someString` or r"someString". Well, IIRC, there are 3 different functions that have to be adjusted to fix this. > > I'm sure it can be improved, but whenever I look at it my head starts to hurt. For example, it uses all kinds of pointer tricks for manipulating strings. I'm sure it makes sense for someone who's used to C/C++, but it just seems like a very un-D way of doing things to me. Okay, I just committed some improvements to SVN. I'm sure there are still some weakness in the way it works (it could malfunction on certain r"soemString" strings). I haven't tested it thoroughly, but it now passes some tests that it failed before. I haven't made a new .zip file, but you can just grab the source file or binary file out of the SVN browser, as I explain in the thread: http://www.dsource.org/forums/viewtopic.php?t=196 -- Justin (a/k/a jcc7) http://jcc_7.tripod.com/d/ |
June 09, 2004 Re: Request: How to convert to library? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Kris | "Kris" <someidiot@earthlink.dot.dot.dot.net> wrote in message news:ca2ioc$13d6$1@digitaldaemon.com... > Thanks JCC; that looks straightforward! > > Do you know of some other method to strip implementation out of modules, so > there's just the stubs left? Not that I'm against distributing source or anything, but sometimes it's just more convenient to have the stubs instead > (otherwise, there's not much benefit over compiling the whole thing to begin > with :-) When importing a file, it doesn't do a full compile on it unless it is in the command line to DMD. Otherwise, it just does a parse, which is pretty quick. |
Copyright © 1999-2021 by the D Language Foundation