www.digitalmars.com         C & C++   DMDScript  

c++.stlsoft - Building recls-1.7.2 with VC6

reply "Carlos Smith" <carlos.smith sympatico.ca> writes:
Hi,

I am working to produce a benchmark for
recls on my computer.

I have :
Ruby 1.8.4 (mswin32 installer)
VC6, Mingw 3.4.5, Cygwin 3.4.4
dmd .146

I just downloaded

recls 1.7.2
stlsoft 1.9.2 beta2

I am trying to buid recls.dsp
The build stopped with an error
for missing pch.cpp file.

I tried the makefile, i got:
NMAKE : fatal error U1073: don't know how to make 
'..\..\sample\sample_directories_C\sample_directories_C.c'

So i tried with recls 1.7.1 : same thing
And i finally tried with recls 1.6.4, which worked
after some work.

There is a lot code in there and very few instructions.

There is no instructions on how to install
the package. I know this is simple to do, but
there is a lot of environment vars to set if
you want to build everything.

Also, some of the makefiles, has references to
"P:\Programs..." in them.
So the linker does not find the libraries.
This should be explained.
There is an invalid option to the linker
-LTCG (or is it -LTGC )

The build coul be automated (ie, no more
directory walking by hand), in order to
build, eg: the vc6 configuration.

May be, it's already there, but i did not
found it.

If you want i can test all the VC6 stuff
an report what is working and what is not.

A lot of hard work had gone in there...
So i do not want to criticize, but i feel
it's not easy to build.

En plus, vous êtes débordé de travail, et
je viens en rajouter sur la pile.
Aussi, prenz tout ça avec un grain de sel,
et répondez moi quand vous pourrez

Thanks for your attention.

Carlos.
Feb 14 2006
next sibling parent reply "Matthew" <nowhere noaddress.co.us> writes:
Carlos,

Thanks for taking the trouble to post.

The project is not well documented, I certainly concede that point.

The intention is build for a given compiler using the makefile in 
<recls-dir>/build/<compiler-id>, so for VC6, you need to open a command 
prompt at the <recls-dir>/build/vc6 directory, and execute nmake. The 
STLSOFT_INCLUDE environment variable must be defined (and the makefile will 
let you know about this), to the root stlsoft include directory (the one 
under which the atlstl, comstl, stlsoft, winstl etc. directories) reside.

I have plans to move recls to SourceForge, and in doing so address all the 
problems about docs, READMEs, installation, etc., but I just haven't found 
the time. (This is one of the reasons I like STLSoft: it's 100% header-only, 
so it's only problem is the paucity of the documentation.)

One of the reasons why my other libs - cstring, b64, openrj, recls, and so 
on - are less well-known/popular than they might be if judged on code alone 
is that all the other stuff - installers, readmes, docs, etc. - are pretty 
much a dark art to me. It sure would be good to find a 
guide-to-open-source-lib-distribution somewhere. ;-)

I'd love it if someone volunteered to help me. But I understand that 
everyone else is likely to be as busy as me. ;-/

Let me know if the advice I've given for building is not sufficient.

Cheers

Matthew




"Carlos Smith" <carlos.smith sympatico.ca> wrote in message 
news:dsuic2$e5i$1 digitaldaemon.com...
 Hi,

 I am working to produce a benchmark for
 recls on my computer.

 I have :
 Ruby 1.8.4 (mswin32 installer)
 VC6, Mingw 3.4.5, Cygwin 3.4.4
 dmd .146

 I just downloaded

 recls 1.7.2
 stlsoft 1.9.2 beta2

 I am trying to buid recls.dsp
 The build stopped with an error
 for missing pch.cpp file.

 I tried the makefile, i got:
 NMAKE : fatal error U1073: don't know how to make 
 '..\..\sample\sample_directories_C\sample_directories_C.c'

 So i tried with recls 1.7.1 : same thing
 And i finally tried with recls 1.6.4, which worked
 after some work.

 There is a lot code in there and very few instructions.

 There is no instructions on how to install
 the package. I know this is simple to do, but
 there is a lot of environment vars to set if
 you want to build everything.

 Also, some of the makefiles, has references to
 "P:\Programs..." in them.
 So the linker does not find the libraries.
 This should be explained.
 There is an invalid option to the linker
 -LTCG (or is it -LTGC )

 The build coul be automated (ie, no more
 directory walking by hand), in order to
 build, eg: the vc6 configuration.

 May be, it's already there, but i did not
 found it.

 If you want i can test all the VC6 stuff
 an report what is working and what is not.

 A lot of hard work had gone in there...
 So i do not want to criticize, but i feel
 it's not easy to build.

 En plus, vous êtes débordé de travail, et
 je viens en rajouter sur la pile.
 Aussi, prenz tout ça avec un grain de sel,
 et répondez moi quand vous pourrez

 Thanks for your attention.

 Carlos.



 
Feb 15 2006
parent "Carlos Smith" <carlos.smith sympatico.ca> writes:
Thanks for taking the time respond.

 One of the reasons why my other libs - cstring, b64, openrj, recls, and so 
 on - are less well-known/popular than they might be if judged on code 
 alone is that all the other stuff - installers, readmes, docs, etc. - are 
 pretty much a dark art to me. It sure would be good to find a 
 guide-to-open-source-lib-distribution somewhere. ;-)
I found this book, while searching for something not related: This does not cover everything, but this is a start. http://www.oreilly.com/catalog/producingoss/index.html You might also study other projects. There is Lua which is simple and is a good example. ( By the way, you could have Lua mapping for Recls ). Another example, is The NEURON Project. I built it, last night. The setup is more complicated, but is very well explained. I just folloed the recipy, and everything built fine, the first try. Here is the address: http://www.neuron.yale.edu/neuron/install/install.html The packaging of Recls is not bad. In fact, i figured out by myself, all what you just said to me. The directory structure is simple. But there is a lot of small details that make the build complicated or gives the product and unfinished feeling. For example, the doc looks very good at first look, but, where you expect to find an explanation on the C mapping of Recls, you get some explanation on OpenRJ ! I guest, this due to a cut-and-paste operation... I can take note of what i find and send it to you. And i may help with the VC5, VC6 and Borland Configuration.
 I'd love it if someone volunteered to help me. But I understand that 
 everyone else is likely to be as busy as me. ;-/

 Let me know if the advice I've given for building is not sufficient.
Feb 19 2006
prev sibling next sibling parent =?ISO-8859-1?Q?Julio_C=E9sar_Carrascal_Urquijo?= writes:
Carlos Smith wrote:
 Hi,
 
 I tried the makefile, i got:
 NMAKE : fatal error U1073: don't know how to make 
 '..\..\sample\sample_directories_C\sample_directories_C.c'
Hi Carlos. I had the same problem today and the error appears because the sample programs where removed from the distribution but not from the makefile. I had to modify the makefile on the definition of the TARGETS variable like the following to exclude the samples from the building process: TARGETS = \ $(TARGETS_TEST) \ $(TARGETS_LIBS) \ After that it throw this error: ..\..\test\C\C.c(512) : warning C4996: 'sprintf' was declared deprecated C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\stdio.h(345) : see declaration of 'sprintf' Message: 'This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.' Which I fixed by adding: CC_TOOL_FLAGS = /D_CRT_SECURE_NO_DEPRECATE=1 CPPC_TOOL_FLAGS = /D_CRT_SECURE_NO_DEPRECATE=1 And then some versions of the test programs didn't build because of duplicated symbols: link -nologo -OPT:NOWIN98 -LTCG -out:..\..\bin\recls.test.C.vc8.dll.debug.exe user32.lib wininet.lib ole32.lib oleaut32.lib .\C.dll.debug.obj ..\..\lib\recls.1.vc8.dll.debug.lib msvcprtd.lib(MSVCP80D.dll) : error LNK2005: "public: char * __thiscall std::allocator<char>::allocate(unsigned int,void const *)" (?allocate ?$allocator D std QAEPADIPBX Z) already defined in recls.1.vc8.dll.debug.lib(ReclsSearch.dll.debug.obj) msvcprtd.lib(MSVCP80D.dll) : error LNK2005: "public: void __thiscall std::allocator<char>::deallocate(char *,unsigned int)" (?deallocate ?$allocator D std QAEXPADI Z) already defined in recls.1.vc8.dll.debug.lib(ReclsSearch.dll.debug.obj)msvcprtd.lib(MSVCP80D.dll) : error LNK2005: "public: __thiscall std::allocator<char>::allocator<char>(void)" (??0?$allocator D std QAE XZ) already defined in recls.1.vc8.dll.debug.lib(ReclsSearch.dll.debug.obj) ..\..\bin\recls.test.C.vc8.dll.debug.exe : fatal error LNK1169: one or more multiply defined symbols found I tried adding /NODEFAULTLIB:msvcprtd.lib to LD_FLAGS, which sometimes seems to work, but just gave more errors so I just commented those: And one hour after I unziped I got those nice .exe and .lib files. :D Anyway, the library seems to work OK on a quick test I made, so it seems we just need to poke Mathew a little to update the makefile after he finishes his book. I'm using Visual Studio 2005 so I don't know if you're going to experience all of this problems. NOTE TO MATHEW: Please add somewhere in the documentation that STLSOFT_INCLUDE should be set WITHOUT quotes even if the folder has spaces. Thank you Mathew, Recls it's really great... once built. ;)
Feb 16 2006
prev sibling parent reply "Matthew" <matthew hat.stlsoft.dot.org> writes:
I'll answer and fix all these things as soon as the book's off for review (I
will finish last major chapter tomorrow, and then two small intros chaps,
and preface, and then done; see progress at http://extendedstl.com/.), so
expect some resolution (and version 1.7.3) next week.

However, for now, I'm just wondering. Would anyone here be interested in
joining the project if/when it goes on to SourceForge? Then you can share
the blame for makefile stuff-ups. ;-)

Cheers

Matthew
Feb 16 2006
next sibling parent =?ISO-8859-1?Q?Julio_C=E9sar_Carrascal_Urquijo?= writes:
Matthew wrote:

 However, for now, I'm just wondering. Would anyone here be interested in
 joining the project if/when it goes on to SourceForge? Then you can share
 the blame for makefile stuff-ups. ;-)
Yes, I might help from time to time, but can only help sending patches. Not much free time right now. At least I can test building with VS2005 and GCC.
Feb 18 2006
prev sibling next sibling parent "Carlos Smith" <carlos.smith sympatico.ca> writes:
 However, for now, I'm just wondering. Would anyone here be interested in
 joining the project if/when it goes on to SourceForge? Then you can share
 the blame for makefile stuff-ups. ;-)
 
I can test th VC5, VC6 and probably the Borland 5.5 configurations.
Feb 19 2006
prev sibling parent "Matthew" <nowhere noaddress.co.us> writes:
Carlos, Julio

If you do have a go with the new recls distro, please be aware that I ran 
out of time before I could get everything sorted to my tastes. However, on 
the up side, I've now got an automated makefile template generator, which 
I've been using for all recent libraries, so (i) I expect that what's in the 
makefiles is in the distros, and (ii) updating the makefile templates is a 
very simple and quick operation. So, if there are any probs, I should be 
able to respond rapidly.

(FYI: the tool chain now goes   <config-file>  =>tmplgen=> 
<makefile-template>  =>tmpl2make=>  N per-compiler/per-operating-system 
<makefile>s. Adding another test/sample/example program involves adjusting 
the <config-file> and simply running my tmplgen and tmpl2make scripts. <g>)

Cheers

Matthew
Jun 18 2006