Error: redefinition of ‘void setUp()’

Have you, as an alternative, tried setting

lib_archive = no

in the platformio.ini? If the function is weak it should be oerridable in user code if it is correctly linked.

Also, since Unity is a C testing framework, it may help to add extern "C" in fron the void setUp() function implementation to avoid name-mangling.

1 Like