Using the procedure described in README_InstallCppUTest.txt, I experienced some problems that I didn't notice with v 3.3:
The old method for disabling memory leak checks (building CppUTest with make CPPUTEST_USE_MEM_LEAK_DETECTION=N) apparently doesn't work anymore. Instead, we should run ./configure --disable-memory-leak-detection and then just make. The documentation at cpputest.org should be updated.
I found that the .a files are not created in the lib subdirectory, but instead directly in CppUTest's home directory. I had to move them to lib before I could link my tests. Maybe there's a parameter I should pass to configure?
The self-tests failed to compile when I typed make check. The results are below.
It hardly matters, but the numbering of the steps in README_InstallCppUTest.txt goes 1, 2a, 2b and then skips to 3c -- a little disorienting.
$ make check
make
CppUTestTests CppUTestExtTests
make[1]: Entering directory
`/home/pferdina/cpputest-3.4'
CXX
CppUTestTests-AllTests.o
CXX
CppUTestTests-SetPluginTest.o
cc1plus: warnings being treated as
errors
tests/SetPluginTest.cpp: In member function \u2018void
FunctionPointerUtest::setup()\u2019:
tests/SetPluginTest.cpp:57:
warning: dereferencing type-punned pointer will break strict-aliasing
rules
tests/SetPluginTest.cpp:58: warning: dereferencing
type-punned pointer will break strict-aliasing
rules
tests/SetPluginTest.cpp:59: warning: dereferencing
type-punned pointer will break strict-aliasing
rules
tests/SetPluginTest.cpp: In member function \u2018void
MaxFunctionPointerUtest::setup()\u2019:
tests/SetPluginTest.cpp:95:
warning: dereferencing type-punned pointer will break strict-aliasing
rules
tests/SetPluginTest.cpp: In member function \u2018void
SetDoublePointerUtest::setup()\u2019:
tests/SetPluginTest.cpp:119:
warning: dereferencing type-punned pointer will break strict-aliasing
rules
make[1]: *** [CppUTestTests-SetPluginTest.o] Error
1
make[1]: Leaving directory `/home/pferdina/cpputest-3.4'
make:
*** [check-am] Error 2
$ gcc --version
gcc
(GCC) 4.1.2 20080704 (Red Hat 4.1.2-48)
Copyright (C) 2006 Free
Software Foundation, Inc.
$ uname -a
Linux
ASBLX36 2.6.18-194.el5 #1 SMP Tue Mar 16 21:52:39 EDT 2010 x86_64
x86_64 x86_64 GNU/Linux