I am trying to build cppunit on hpux 11 with aCC 3.30. I
specified the path to my compiler when running config:
configure --prefix=/opt/acc.03.30
I get errors (below) when I try to build. Is this
configuration supported?
No suffix list.
Making all in src
No suffix list.
Making all in cppunit
source='Asserter.cpp' object='Asserter.lo'
libtool=yes \
depfile='.deps/Asserter.Plo'
tmpdepfile='.deps/Asserter.TPlo' \
depmode=none /bin/sh ../../config/depcomp \
/bin/sh ../../libtool --mode=compile aCC -
DHAVE_CONFIG_H -I. -I. -I../../config -I../../include -
I../../include
-g -c -o Asserter.lo `test -f Asserter.cpp ||
echo './'`Asserter.cpp
rm -f .libs/Asserter.lo
aCC -DHAVE_CONFIG_H -I. -I. -I../../config -
I../../include -I../../include -g -c Asserter.cpp +Z -DPIC
Error 119: "../../include/cppunit/Portability.h", line 81 #
#error Cannot define CppUnit::OStringStream.
# error Cannot define CppUnit::OStringStream.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error (future) 600: "../../include/cppunit/SourceLine.h",
line 35 # Type specifier is omitted; "int" is no longer
assumed.
SourceLine( const std::string &fileName,
^^^^^
Error 20: "../../include/cppunit/SourceLine.h", line 35 # ','
expected before '::'.
SourceLine( const std::string &fileName,
^^
Error 19: "../../include/cppunit/SourceLine.h", line 45 #
Unexpected 'std'.
std::string fileName() const;
^^^
Error 19: "../../include/cppunit/SourceLine.h", line 51 #
Unexpected 'std'.
std::string m_fileName;
^^^
Error 19: "../../include/cppunit/Asserter.h", line 47 #
Unexpected 'std'.
void CPPUNIT_API fail( std::string message,
^^^
Error 19: "../../include/cppunit/Asserter.h", line 57 #
Unexpected 'std'.
std::string message,
^^^
Error 20: "../../include/cppunit/Asserter.h", line 67 # ')'
expected before '::'.
void CPPUNIT_API failNotEqual( std::string
expected,
^^
Error 20: "../../include/cppunit/Asserter.h", line 68 # ';'
expected before '::'.
std::string actual,
^^
Error 20: "../../include/cppunit/Asserter.h", line 69 # ','
expected before 'sourceLine'.
SourceLine sourceLine =
SourceLine(),
^^^^^^^^^^
Error 283: "../../include/cppunit/Asserter.h", line 69 #
Illegal operand type in call expression.
SourceLine sourceLine =
SourceLine(),
^^^^^^^^^^
Error 173: "../../include/cppunit/Asserter.h", line 70 #
Redefined symbol 'std'; previously defined at
["../../include/cppunit/Asserter.h", line 68].
std::string additionalMessage
="" );
^^^
Error 20: "../../include/cppunit/Asserter.h", line 70 # ';'
expected before '::'.
std::string additionalMessage
="" );
^^
Error 699: "../../include/cppunit/Asserter.h", line 70 #
Error limit reached; halting compilation.
std::string additionalMessage
="" );
^^
*** Error exit code 1
Stop.
*** Error exit code 1
Stop.
*** Error exit code 1
Stop.
Logged In: YES
user_id=196852
It looks like your STL classes are not within the std
namespace.
Try CppUnit 1.9.10 which provides support for such platform.
Baptiste.
Logged In: YES
user_id=483863
Looks like the latest version posted here is 1.8.0. Where
would I get 1.9.10?
Logged In: YES
user_id=196852
There is a link to it in the 'lastest news'. It's a development
snapshot, but it's stable and fairly close to what the next
stable release will be. Stability refer to the API.
http://cppunit.sourceforge.net/snapshot/
Baptiste.
Logged In: YES
user_id=883634
I'm using the dev build 1.9.11 and this configuration:
./configure CC=cc CXX=aCC CPPFLAGS=-AA LDFLAGS=-AA
to successfully build and run the self-tests on HP-UX 11.00
using aCC A.03.37.
The -AA flag makes aCC behave like a modern C++ compiler
instead of being remaining compatible with the older aCC
versions (this changes the binary compatibility, so your tests
need to be compiled with -AA, also).
Lastly, the "--prefix" you are using above is for specifying the
destination directory for cppunit binaries (not the compiler's
location).
Hope this helps.