Closed hallfjonas closed 3 years ago
I am not 100% sure this is the reason of your crash, but qpOASES redefines internally some BLAS/LAPACK functions, and this can create problems if linking with another library that uses BLAS or LAPACK. If you compiled qpOASES with CMake, you can try to use the PR https://github.com/coin-or/qpOASES/pull/108 and to set to ON
the CMake option QPOASES_AVOID_LA_NAMING_CONFLICTS
, and do your test again.
I'm sorry it took me so long to verify this, but yes in fact this is the solution. Thank you so much!
Hello,
I wanted to use matplotlib-cpp to create some plots after solving some QPs with qpOASES. I ran into a weird issue where I could not simultaneously run the plot command while having a class property of type QProblem. My minimal working example contains one TestClass and a main function to create a plot:
class TestClass { public: TestClass();
};
include "TestClass.hpp"
include
TestClass::TestClass() { }
include
include
int main(int argc, char *argv[]) { std::cout << "Entering Main...\n"; std::vector x;
std::vector f;
}
g++ -g -Wall -pedantic matplotlibtest.cpp TestClass.cpp -I/usr/local/qpOASES/include -I/usr/local/matplotlib-cpp -I. -I/usr/include/python3.6m -I/usr/local/qpOASES/include/qpOASES -lpython3.6m -lqpOASES
Entering Main... Plot vectors created... Segmentation fault (core dumped)
Entering Main... Plot vectors created... Plot created ... leaving main ...