osqp / qdldl

A free LDL factorisation routine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compile error with Windows ninja build

Levi-Armstrong opened this issue · comments

The OSQP library and related QDLDL library are renaming the static library target to have the same name as the shared target. This is fine on Linux, since shared and static libraries have different extensions. On Windows, static libraries have a .lib extension, while shared libraries have a .dll extension, but also produce a .lib file that contains linking information. (Linux and OSX don't have this second linker file. They just use the .so or .dylib file.) Renaming to have the same name between static and shared results in a name conflict. Before this error was being silently ignored.

This is a cross-post of an issue on the tesseract_planning repository which has more information provided by the author of the issue.

The problem described in this issue probably would affect also other Windows generators (for example Visual Studio) as soon as https://github.com/osqp/qdldl/pull/36/files is merged, as after that PR is merged both the qdldl target and the qdldlstatic target will generate a out/osqp.lib . At the moment the problem is hidden as the qdldl shared library does not expose symbols, so no imported library osqp.lib is created.

@traversaro Can this be closed not that the PR is merged?

@Levi-Armstrong I think the problem was solved by #38, as now you can select to compile only the shared or only the static libraries. If you want to compile both shared and static at the same time the problem is still there, but I think that make sense. If you like, feel free to close the issue (to clarify, I am not related to this repo in any way, beside the fact that I am a user).