Closed traversaro closed 3 years ago
Thanks @traversaro! There was a bug in the CI pipeline, so I didn't catch this error. Thanks for fixing!
Hi @ruckig, actually I think that the change I proposed is problematic, as it results in the library being called python_ruckig.cp39-win_amd64.pyd
. The correct variable to set is LIBRARY_OUTPUT_NAME
, but perhaps a more robust change is just to have the following logic, without any MSVC-specific code:
set_target_properties(python_ruckig PROPERTIES OUTPUT_NAME ruckig)
# To avoid conflicts in import libraries names in MSVC
set_target_properties(python_ruckig PROPERTIES ARCHIVE_OUTPUT_NAME python_ruckig)
Now it seems to work fine :+1:
Great, thanks! cc @ahoarau
When building the Python bindings on Windows, the
python_ruckig
target generate three files: a.exp
, a.lib
and a.dll
.The.dll
has a special name that avoids its collision with theruckig.dll
shared library, but ifOUTPUT_NAME
is simply set toruckig
, then theruckig.lib
of thepython_ruckig
target has the same name of theruckig.lib
of theruckig
target, resulting in compilation errors such as:This PR avoids the problem by just setting
RUNTIME_OUTPUT_NAME
(that just change the names of the .dll) when MSVC is used.