Thread overview | ||||||||
---|---|---|---|---|---|---|---|---|
|
January 28, 2004 samples bug: recls | ||||
---|---|---|---|---|
| ||||
The recls samples (both recls_test_1.d and recls_test_2.d) compile but don't link, neither in Windows nor Linux (with dmd 0.79, win xp, mandrake 9). ----------------------- Carlos Santander Bernal |
January 28, 2004 Re: samples bug: recls | ||||
---|---|---|---|---|
| ||||
Posted in reply to Carlos Santander B. | I've not tested them since 0.78. Can you give more information "Carlos Santander B." <carlos8294@msn.com> wrote in message news:bv768a$17n3$1@digitaldaemon.com... > The recls samples (both recls_test_1.d and recls_test_2.d) compile but don't > link, neither in Windows nor Linux (with dmd 0.79, win xp, mandrake 9). > > ----------------------- > Carlos Santander Bernal > > |
January 28, 2004 Re: samples bug: recls | ||||
---|---|---|---|---|
| ||||
Posted in reply to Carlos Santander B. | Carlos Santander B. wrote: > The recls samples (both recls_test_1.d and recls_test_2.d) compile but don't > link, neither in Windows nor Linux (with dmd 0.79, win xp, mandrake 9). That sounds like a problem I had. > > ----------------------- > Carlos Santander Bernal I haven't looked at recls_test_1 and _2, but I suspect you need to create recls.lib using a command line like this (Windows version)... cd \DMD\SRC\PHOBOS\ETC\C\RECLS make -fwin32.mak Then put recls.lib in the a lib path (probably either \dm\lib or \dmd\lib) and include it when you compile your file. I've attached a sample file I've used to test recls. (By the way, it seems to me like this should be documented somewhere, but I couldn't find it at the recls website: http://recls.org/.) Good luck. -- Justin http://jcc_7.tripod.com/d/ |
January 28, 2004 Re: samples bug: recls | ||||
---|---|---|---|---|
| ||||
Posted in reply to J C Calvarese | I think you're right. But the contents of recls.lib should be in phobos.lib. I'm confused Walter, did something happen to remove them in the latest build? In the meantime, chaps (and chappettes), we'll have to figure out a way to workaround it. Give me a few mins to check it out. Matthew "J C Calvarese" <jcc7@cox.net> wrote in message news:bv77c1$19gn$1@digitaldaemon.com... > Carlos Santander B. wrote: > > The recls samples (both recls_test_1.d and recls_test_2.d) compile but don't > > link, neither in Windows nor Linux (with dmd 0.79, win xp, mandrake 9). > That sounds like a problem I had. > > > > > ----------------------- > > Carlos Santander Bernal > > I haven't looked at recls_test_1 and _2, but I suspect you need to create recls.lib using a command line like this (Windows version)... > > cd \DMD\SRC\PHOBOS\ETC\C\RECLS > make -fwin32.mak > > Then put recls.lib in the a lib path (probably either \dm\lib or \dmd\lib) and include it when you compile your file. > > I've attached a sample file I've used to test recls. > > (By the way, it seems to me like this should be documented somewhere, but I couldn't find it at the recls website: http://recls.org/.) > > Good luck. > > -- > Justin > http://jcc_7.tripod.com/d/ > ---------------------------------------------------------------------------- ---- > @echo off > dmd recls.d recls.lib > pause > cd \ > f:\pgm\d\testing\phobos\recls.exe > pause ---------------------------------------------------------------------------- ---- > > /* > > File: recls.d > Author: J C Calvarese > License: Public Domain > Date: 2004-01-23 > Purpose: Demonstrate simple usage of the recls library. > > Make recls.lib using a command line like this... D:\DMD\SRC\PHOBOS\ETC\C\RECLS>make -fwin32.mak > > Then put recls.lib in the a lib path (probably either \dm\lib or \dmd\lib). > > Here's the batch file I used to compile and test my recls sample: > > @echo off > dmd recls.d recls.lib > pause > cd \ > \pgm\d\testing\phobos\recls.exe > pause > > > Read the recls FAQ: > http://recls.org/faq.html > > */ > > import std.recls; > > void main() > { > Search search = new Search(".", "*.*", RECLS_FLAG.RECLS_F_RECURSIVE); > foreach(Entry entry; search) > { > with(entry) > { > if(!ShortFile()) > printf("%.*s%.*s\n", DirectoryPath(), File()); > else > printf("%.*s%.*s (%.*s)\n", DirectoryPath(), File(), ShortFile()); > } > } > } |
January 28, 2004 Re: samples bug: recls | ||||
---|---|---|---|---|
| ||||
Posted in reply to Matthew | I've just checked in win32.mak in the phobos root dir. The offending lines are: phobos.lib : $(OBJS) minit.obj internal\gc\dmgc.lib etc\c\zlib\zlib.lib \ win32.mak etc\c\recls\recls.lib lib -c phobos.lib $(OBJS) minit.obj internal\gc\dmgc.lib etc\c\zlib\zlib.lib It looks as though big-W hasn't put "etc\c\recls\recls.lib" on the command-line, as well as on the dependency line. Still, it's not all his fault, as I clearly have not checked that recls worked as part of Phobos. Blushes all round, I guess. Walter, what's the best next step? When's the new release due? In the meantime, JC's advice is the right one, i.e. you'll need to build the recls.lib and use that. It shouldn't present a problem, beyond being a PITA. Sorry. Cheers Matthew "Matthew" <matthew.hat@stlsoft.dot.org> wrote in message news:bv77hi$19qd$1@digitaldaemon.com... > I think you're right. > > But the contents of recls.lib should be in phobos.lib. I'm confused > > Walter, did something happen to remove them in the latest build? > > In the meantime, chaps (and chappettes), we'll have to figure out a way to > workaround it. > > Give me a few mins to check it out. > > Matthew > > > > "J C Calvarese" <jcc7@cox.net> wrote in message news:bv77c1$19gn$1@digitaldaemon.com... > > Carlos Santander B. wrote: > > > The recls samples (both recls_test_1.d and recls_test_2.d) compile but > don't > > > link, neither in Windows nor Linux (with dmd 0.79, win xp, mandrake 9). > > That sounds like a problem I had. > > > > > > > > ----------------------- > > > Carlos Santander Bernal > > > > I haven't looked at recls_test_1 and _2, but I suspect you need to create recls.lib using a command line like this (Windows version)... > > > > cd \DMD\SRC\PHOBOS\ETC\C\RECLS > > make -fwin32.mak > > > > Then put recls.lib in the a lib path (probably either \dm\lib or \dmd\lib) and include it when you compile your file. > > > > I've attached a sample file I've used to test recls. > > > > (By the way, it seems to me like this should be documented somewhere, but I couldn't find it at the recls website: http://recls.org/.) > > > > Good luck. > > > > -- > > Justin > > http://jcc_7.tripod.com/d/ > > > > > -------------------------------------------------------------------------- -- > ---- > > > > @echo off > > dmd recls.d recls.lib > > pause > > cd \ > > f:\pgm\d\testing\phobos\recls.exe > > pause > > > -------------------------------------------------------------------------- -- > ---- > > > > > > /* > > > > File: recls.d > > Author: J C Calvarese > > License: Public Domain > > Date: 2004-01-23 > > Purpose: Demonstrate simple usage of the recls library. > > > > Make recls.lib using a command line like this... D:\DMD\SRC\PHOBOS\ETC\C\RECLS>make -fwin32.mak > > > > Then put recls.lib in the a lib path (probably either \dm\lib or > \dmd\lib). > > > > Here's the batch file I used to compile and test my recls sample: > > > > @echo off > > dmd recls.d recls.lib > > pause > > cd \ > > \pgm\d\testing\phobos\recls.exe > > pause > > > > > > Read the recls FAQ: > > http://recls.org/faq.html > > > > */ > > > > import std.recls; > > > > void main() > > { > > Search search = new Search(".", "*.*", > RECLS_FLAG.RECLS_F_RECURSIVE); > > foreach(Entry entry; search) > > { > > with(entry) > > { > > if(!ShortFile()) > > printf("%.*s%.*s\n", DirectoryPath(), File()); > > else > > printf("%.*s%.*s (%.*s)\n", DirectoryPath(), File(), ShortFile()); > > } > > } > > } > > |
Copyright © 1999-2021 by the D Language Foundation