-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compile error on Windows with vs2022 and vs2019 when compiling against osqp master branch (future osqp v1) #146
Comments
Thanks for reporting the problem! The code for compatibility with osqp v1 (i.e. osqp master) is quite new (it was added in #145), hopefully we are able to solve this problem before the osqp v1 first official release. In the meantime, a workaround is either to use osqp v0.6.3 or (but this is just a guess) compile osqp and osqp-eigen as static libraries. |
fyi @gergondet |
Note that a possible solution is just to include a local copy of the csc_spalloc function (this would help also for #142, fyi @Levi-Armstrong). Probably it is als a good idea to ask upstream how an OSQP sparse matrix is supposed to be created, if csc_spalloc is now private. From https://github.com/osqp/osqp/blob/1ac3fab74ddeebb0a24b8b7f96e1e539423d4a6a/docs/examples/update-vectors.rst#L198, it seems that the idea is to use the |
Thank you very much for your response! I followed your instructions to use osqp v0.6.3. However, unfortunately, I encountered the same issue as you did before when installing v0.6.3. I'm not sure how to resolve this problem.
If you could help me with this question, I would be extremely grateful. |
See osqp/osqp#309 for a related issue. A simple workaround is to use another CMake generator, like NMake Makefiles or Visual Studio 16 2019/Visual Studio 17 2022 |
Sorry about that. I went with the simplest solution I could think of at the time and since the symbol is available on Linux even when the API is hidden but that's definitely not a clean solution and it breaks on Windows since the symbol is not available.
I think this leaves you responsible for allocating the |
No problem!
I did not tought of the license, indeed having just a chunk of Apache-2.0 code in a BSD license is not ideal, even if doable. Let's open an issue upstream to discuss this with osqp mantainers. |
I renamed this issue to clarify what is tracking. |
install with osqp(master) and osqp-eigen(master)
but when "make" step, we meet this error
It seems the problem is here three lines of code
https://github.com/robotology/osqp-eigen/blob/a752c5e6353cae6176578488a1fa641d3b9cf0b9/include/OsqpEigen/Compat.hpp#L21C1-L21C1
csc_spalloc and csc_spfree with error LNK2019: unresolved external symbol
The text was updated successfully, but these errors were encountered: