Closed baharehhj closed 9 months ago
I think this is the same problem reported in https://github.com/robotology/osqp-eigen/issues/146 . In a nutshell, which version of osqp are you using? osqp-eigen is working fine with the latest release of osqp (0.6.3), while with the master branch there are still some problems such as the one discussed in https://github.com/robotology/osqp-eigen/issues/146 . There is anything preventing you to use osqp 0.6.3 ?
Thank you for your prompt response.
Actually, I'm not an expert, so I hope my question isn't too simplistic. Here are the steps I followed:
First, I ran git clone https://github.com/osqp/osqp.git. Then I executed cmake .. in the build folder and proceeded to open osqp.sln and build ALL_BUILD and INSTALL. After that, I ran git clone for osqp-eigen, and I repeated the same steps for osqp-eigen. However, when I right-clicked on ALL_BUILD and tried to build it, I encountered the following errors:
Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol csc_spfree referenced in function "public: __cdecl OsqpEigen::Data::~Data(void)" (??1Data@OsqpEigen@@QEAA@XZ) OsqpEigen C:\osqp\osqp-eigen\build\Data.obj 1
Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol csc_spalloc referenced in function "bool __cdecl OsqpEigen::SparseMatrixHelper::createOsqpSparseMatrix<class Eigen::SparseMatrix<double,0,int> >(class Eigen::SparseCompressedBase<class Eigen::SparseMatrix<double,0,int> > const &,struct OSQPCscMatrix * &)" (??$createOsqpSparseMatrix@V?$SparseMatrix@N$0A@H@Eigen@@@SparseMatrixHelper@OsqpEigen@@YA_NAEBV?$SparseCompressedBase@V?$SparseMatrix@N$0A@H@Eigen@@@Eigen@@AEAPEAUOSQPCscMatrix@@@Z) OsqpEigen C:\osqp\osqp-eigen\build\Solver.obj 1
If you just clone the default branch of repos, you can get a version of a library with the latest changes that still need to be released. To avoid this, after you clone the repo you can checkout a given tag that identifies a specific release. I suggest you do this for osqp.
@baharehhj if this works, can you close the issue? As we already have https://github.com/robotology/osqp-eigen/issues/146 to deal with the specific problem.
I'm encountering challenges while building and installing the library in my C++ environment. My objective is to implement a quadratic programming function similar to MATLAB's quadprog() function with inputs which are sparse matrix. However, I'm facing difficulties defining addresses for Eigen, OSQP (compiled with 64-bit integers) during the build process.
After cloning the library, I added a build folder and ran cmake .. in the command line, which resulted in a successful build:
C:\osqp\osqp-Eigen\build>cmake ..
However, when I opened OSqp-eigen.sln in Visual Studio and attempted to build it, I encountered the following errors:
It seems like there's a problem with finding OSQP and Eigen. Could someone provide guidance or a step-by-step process on how to properly define the addresses for Eigen and OSQP when building the library in the CMakeLists.txt file? Or any other ideas to resolve these errors?
thanks in advance