PlatformIO Community

Testing c++ code

Hi,

I’m new to platformIO and to be honest also to unit testing. I try to write my code in C++ but I’m running into an linker error when I start to run a test. Anyone have an idea what the problem might be?

The linker is unable to find the compiled implementations of the Storage class.

What is the file layout of the project and the platformio.ini?

Hi,

Thx for your quick response. Here’s my ini file.

_platform.ini

And here’s my folder structure.

Could you share a full output of pio test -v? We will see which libraries LDF sees.

Here’s my log file:

Test log file

Thanks for your effort but I got it to work. Turns out my code was the problem. The code compiles but I hadn’t finished the implementation of the storage class yet so the linker simply couldn’t find the missing functions.

1 Like