I'm having a problem compiling AllTests.cpp after adding the setup code which seems to be recommended in
Plugin Manual re: SetPointerPlugin . My AllTests.cpp looks like this:
```
#include "CppUTest/CommandLineTestRunner.h"
int main(int ac, char** av)
{
TestRegistry* r = TestRegistry::getCurrentRegistry();
SetPointerPlugin ps("PointerStore");
r->installPlugin(&ps);
return CommandLineTestRunner::RunAllTests(ac, av);
}
```
but when I compile it (gcc:10), I get an error:
```
$ make ./test-obj/1/2/tests/AllTests.o
compiling AllTests.cpp
tests/AllTests.cpp: In function ‘int main(int, char**)’:
tests/AllTests.cpp:11:34: error: incomplete type ‘TestRegistry’ used in nested name specifier
11 | TestRegistry* r = TestRegistry::getCurrentRegistry();
| ^~~~~~~~~~~~~~~~~~
compilation terminated due to -Wfatal-errors.
make: *** [/home/keith/e2_studio/Ranger/CppUTest/build/MakefileWorker.mk:511: test-obj/1/2/tests/AllTests.o] Error 1
```
So I'm wondering whether the setup code for SetPointerPlugin is really needed, or if something has recently gone wrong with a merge request. I'm using git to pull the code from the latest-passing-build tag with the following line first:
#!/bin/sh
cd ../CppUTest
# ensure we've checked out the "latest-passing-build" tag
git checkout tags/latest-passing-build
...
Does anybody know whether or not this code needs to be added to get the support for UT_PTR_SET?
P.S. $ gcc --version shows gcc GCC) 10.20.0 ...
I'm running these things in Windows 10 under an updated Msys2 shell.
thanks,
Keith