Here's my current setup:
I recently added a class, namely MyCoolClass.h:
#include "AnotherBoringClass.h" // also inherits from BoringClass
class SuperCoolClass: public BoringClass
{
/*
* My super cool implementation
*/
protected:
std::shared_ptr<AnotherBoringClass> myCoolPointer;
}
Everything is fine, compiles and so on. But when I try to add a unit test:
#include "CppUnitTest.h"
#include "MyCoolClass.h"
TEST_CLASS(MyTestClass)
{
public:
/*
* Bunch of super cool -working- tests
*/
TEST_METHOD(MyBrokenTest)
{
auto myVar = std::make_shared<MyCoolClass>(); // as soon as I comment this line everything works!!!
}
}
When I comment the line as above everything work well! What am I doing wrong?
What I've tried:
This, but I've got everything in the same output folder. Also, I make use of QuantLib and Boost, but all other Unit Tests work fine
Same as previous link
Thanks in advance!
After an endless effort to solve the problem, I finally did it. It was because I was using MKL linked statically, whereas my program was compiled using the option Property -> C/C++ -> Code Generation -> Runtime Library -> xxx DLL.
Hope it helps!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With