-
Notifications
You must be signed in to change notification settings - Fork 534
Description
I don't know whether I forgot to define something or not.
As I'm using CppUTest on a baremetal ARM Cortex-M target, built as a separate project / static library, which my main project then links, and includes headers of.
In the project using the lib, when I #include "CppUTest/TestHarness.h" in a test.cpp file which then uses macros like TEST_GROUP etc, I get the following error, and other errors about C++ std stuff not knowing about other std stuff in many repetitions:
arm-none-eabi/include/c++/13.3.1/new:126:26: error: declaration of 'operator new' as non-function
Using ARM GCC 13.3.1.
If I put before including TestHarness.h:
#include <memory>
everything works. The program with the tests executes as expected on my emulator target(1), the executable size looks normal.
My program has, for the C++ compiler, these global defines:
CPPUTEST_STD_CPP_LIB_DISABLED
CPPUTEST_STD_C_LIB_DISABLED
CPPUTEST_CHAR_BIT=8
CPPUTEST_HAVE_FENV=0
CPPUTEST_HAVE_GETTIMEOFDAY
(1) I'm using Renode, if anyone is curious - not quite as sluggish as QEMU, and has a simulated UART where I can see CppUTest's text output, e.g. in a Telnet console.