found this
http://www.efnetcpp.org/wiki/cstring_header
 
will change static.h.
 
static.h MUST be included from every source file in kernel to use precompiled headers.

jozo



> Date: Mon, 28 Jan 2008 17:14:24 +0100
> From: mstsxfx@gmail.com
> To: varunhiremath@iitm.ac.in
> CC: pdfedit-devel@lists.sourceforge.net; misutkajunior@hotmail.com
> Subject: Re: [Pdfedit-devel] confparser gcc 4.3 compilation problem
>
> On Mon, Jan 28, 2008 at 09:06:07PM +0530, Varun Hiremath wrote:
> > Hi Michal,
> >
> > On Mon, 28 Jan, 2008 at 03:19:42PM +0100, Michal Hocko wrote:
> > > >
> > > > BTW, all the missing functions seem to be defined in
> > > > /usr/include/c++/4.3/cstring file and /usr/include/c++/4.3/string
> > > > file looks to be empty.
> > >
> > > I have looked to my string and cstring files and string file is not empty
> > > (attached).
> > >
> > > >
> > > > Is there any particular reason why you would want to use string
> > > > instead of cstring?
> > >
> > > We have used include from string for a rather long time and there was no
> > > problem until now. I don't know difference between the 2 files.
> > > Nevertheless, I have done one more experiment. I have removed
> > > #include <string> from confparser.h and there is no problem at all. When
> > > I looked deeper, then it revealed that string is included from
> > > kernel/static.h which is included from almost all kernel files.
> > > If you didn't have problem with that then something is really wrong.
> >
> >
> > Okay, I got it. You seem to have kernel/static.h included in
> > confparser.h, right? Here I didn't have it include so it was filaing
>
> No, we are including it from confparser.cc, but this won't make any
> difference here.
>
> > to build but now I have included kernel/static.h and it builds.
>
> Could you try the latest CVS (from devel-msts-unified_makefiles branch)?
> Do you still have problem to get sources from there?
> I have just tried:
> cvs -z3 -d:pserver:anonymous@pdfedit.cvs.sourceforge.net:/cvsroot/pdfedit \
> co -r devel-msts-unified_makefiles pdfedit
>
> and didn't have any problems.
>
> >
> > But, actually you are indirectly including cstring through the boost
> > header files. In kernel/static.h you have:
> >
> > //============================================
> > // boost
> > //============================================
> > #include <boost/smart_ptr.hpp>
> > #include <boost/iostreams/stream.hpp>
> > #include <boost/iostreams/filtering_stream.hpp>
> >
> >
> > If you look at boost/iostreams/stream.hpp it has:
> >
> > #include <boost/iostreams/constants.hpp>
> > #include <boost/iostreams/detail/char_traits.hpp>
> >
> > and now if you look at boost/iostreams/detail/char_traits.hpp:
> >
> > # include <boost/config.hpp> // Make sure size_t is in std.
> > # include <cstddef>
> > # include <cstring> <<===========
> > # include <cstdio>
>
> Yes, but note that these are included only if
> BOOST_IOSTREAMS_NO_STREAM_TEMPLATES is defined. I don't have any idea
> what is it...
> Nevertheless it is not clean to rely on including this header by
> boost headers, so it has to be sorted out.
>
> > So, you can as well include cstring directly because the #include
> > <string> is never used from kernel/static.h (you may remove it). It is
> > this cstring which is included through boost headers that makes it
> > work with gcc/g++ 4.3
>
> Jozo, could you check if it is clear to add #include <cstring> into
> kernel/static.h instead of string?
> My quick test (cd src && make clean & make) was succesfull.
>
> >
> > Hope that ends all confusion.
>
> Thanks for your investigation.
>
> Just to be sure. Could you send me string from 4.3 and some older c++
> directory? I still don't understand difference between those 2 files.
> All C++ manuals/books claims that #include <string> should be used when
> C++ strings are used.
>
> >
> > Regards
> > Varun
> >
> > --
> > Varun Hiremath
> > Undergraduate Student,
> > Aerospace Engineering Department,
> > Indian Institute of Technology Madras,
> > Chennai, India
> > -------------------------------------
> > Homepage: http://varun.travisbsd.org
>
> --
> Michal Hocko



Helping your favorite cause is as easy as instant messaging. You IM, we give. Learn more.