I've never seen this question asked before. It sounds like a compiler bug,
or a problem with STLport. for_each is supposed to be defined in
<algoithm>, and that file _is_ included.
Have you tried reducing this to a minimal test case? If you can reproduce
it that way, you might want to ask the question on the STLport forum.
It's nearly impossible for us to keep up with the various versions of gcc
and STLport out there -- especially since we don't build using the STLport
on any of our standard platforms.
Dave
"Fung, Warren"
<[EMAIL PROTECTED] To:
<[email protected]>
m> cc: (bcc: David N
Bertoni/Cambridge/IBM)
Subject: Compiling with STLPort
4.1: for_each undeclared
03/06/2002 08:54
PM
Hello,
I believe similar questions have been posted before, but never answered.
I'm trying to compile Xalan 1.3 with STLPort 4.1 on a Linux machine and
I reached this stumbling block:
/usr/local/bin/gcc-2.95.2/bin/c++ -O2 -mcpu=pentiumpro -g -DNDEBUG
-DUSE_STLPORT -pthread -D_PTHREADS
-I/usr/local/lib/stlport-4.1.b3.z1/include/stlport -fpic -Wall
-instances=static -DLINUX -D_REENTRANT -c -I.
-I/usr/local/xerces-c1_6_0-linux/src/
-I/usr/local/xerces-c1_6_0-linux/include/xercesc
-I/usr/local/xerces-c1_6_0-linux/include/ -o
/usr/local/xml-xalan/c/obj/XalanDOMStringPool.o
PlatformSupport/XalanDOMStringPool.cpp
PlatformSupport/ArenaAllocator.hpp: In method `void
ArenaAllocator<XalanDOMString,ArenaBlock<XalanDOMString> >::reset()':
PlatformSupport/ArenaAllocator.hpp:114: instantiated from
`ArenaAllocator<XalanDOMString,ArenaBlock<XalanDOMString>
>::~ArenaAllocator()'
PlatformSupport/XalanDOMStringPool.cpp:74: instantiated from here
PlatformSupport/ArenaAllocator.hpp:226: `for_each' undeclared (first use
this function)
PlatformSupport/ArenaAllocator.hpp:226: (Each undeclared identifier is
reported only once
PlatformSupport/ArenaAllocator.hpp:226: for each function it appears
in.)
Even when I changed it to std::for_each, the compiler does not know
where to find the function. The code compiles fine without STLPort.
Anyone perhaps encountered a similar problem?
...
Warren Fung
Software Design Engineer, Anywhere
Amazon.com
[EMAIL PROTECTED]
206.266.6551