Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added submodule fix for non-unit-test builds

...

Code Block
languagecpp
mkdir build
cd build
cmake ..
make runUnitTests.o
./runUnitTests.o
 

5.1 Errors and fixes

Cannot find googletest

Uninitialized git submodules

This problem has many different manifestations. They include

  • cannot find MadgwickAHRS.h
  • cannot find googletest

A common error when compiling unit tests will be something in terms of cannot find googletest. That probably means you haven't initialized git submodules, so run git submodule update --init

Error: leaked mock object

As this error tells you, you have a leaked mock object, which was not deleted. There are multiple possible reasons for this:

...