Closed graial closed 6 months ago
Hi,
Might be something related to cpp 12.
You might wanna start with one of the examples and -std=gnu++17
Good evening and thank you for your response. No luck with gnu++17 though.
these are the default compiler flags used by cpputest
-pedantic -Wno-missing-prototypes -Wno-strict-prototypes -Wno-c++14-compat --std=gnu++17 // was originally --std=c++11 -Wno-c++98-compat-pedantic -Wno-c++98-compat
So... if you comment out all of the CppUTest code and just do the #include of the ArduinoFake then it already occurs ?
yes, correct. and if that #include is removed, the test suite completes successfully
So there seems to be something in the makefile or compiler chain that is unhappy
The ArduinoFake example projects and tests (using Unity) work for me.
I attempted to use the same approach to build cpputest in this repo and it fails on the same error.
I've now gotten this to a minimal reproducible example via cmake.
i believe that the lines:
set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON)
establish the -std=gnu++17
specification
cheers
Greetings @FabioBatSilva, just wanted to mention that with some help on the cpputest forum, I was able to clear this.
https://github.com/graial/ArduinoFake-cpputest
my forked repo is now building but encountering a different error which I haven't yet investigated. If I can't sort that out, I'll open up a different issue when i get the chance
cheers
Greetings, I tried to
#include "ArduinoFake.h"
in a project tested with cpputest (both from docker & native install) and encountered this error.Searching the internet, I've noticed threads like this which mention the need for a default constructor. This is pushing me into areas of C++ I am very unfamiliar with.
Is this something i can do during test set-up? If so, how?
I created minimal example here
Many thanks for any feedback or suggestions.