After a quick look, you should look at this (I could be wrong, but the thing to try is easy)
https://cpputest.github.io/manual.html#conflicts-with-operator-new-macros-stl
CppUTest forces an include file for memory leak detection that can sometime cause preprocessor errors. That link shows you what to do about it.
--
You received this message because you are subscribed to the Google Groups "cpputest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cpputest+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cpputest/5a53509b-4599-4e5f-8872-b56410ce84dbn%40googlegroups.com.
![]() |
wingman-sw.com blog.wingman-sw.com @jwgrenning facebook.com/wingman.sw |
Hi Allan
Did your make your own forced include file?
I am not a Make person.
Your cmake would need to add this gcc build command line option
-include ./MyMemoryLeakDetectorNewMacrosFile.h
The MyMemoryLeakDetectorNewMacrosFile.h
file contents should look like this, given that ArduinoFake.h
contains #include <unordered_map>
#ifndef MY_MEMORY_LEAK_DETECOTOR_NEW_MACROS_FILE_INCLUDED
#define MY_MEMORY_LEAK_DETECOTOR_NEW_MACROS_FILE_INCLUDED
#include <unordered_map>
#include "CppUTest/MemoryLeakDetectorNewMacros.h"
#endif
To view this discussion on the web visit https://groups.google.com/d/msgid/cpputest/48bbe0d6-b4cf-4172-a575-85131ec6688cn%40googlegroups.com.
Hi Allan
I forget... Are you having a build problem or a run problem?
BTW: I've experimented with FakeIt but gave it up as the single header file solution for my uses deploying programming exercises on cyber-dojo.org. Compilation time made it impractical for me.
To view this discussion on the web visit https://groups.google.com/d/msgid/cpputest/85aa7971-7eb5-40e8-b544-bc077ea98184n%40googlegroups.com.
Hi Allan
It builds for me on a Mac. Just like the directions. But it does include any Arduino or FakeIt dependencies in MyFirstTest.cpp
Is that what you are looking for?
HTH James
To view this discussion on the web visit https://groups.google.com/d/msgid/cpputest/640cee5e-206c-49f9-b558-79cfdf82b869n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cpputest/640cee5e-206c-49f9-b558-79cfdf82b869n%40googlegroups.com.