Manual linking against Python3_LIBRARIES needed? #4911
Unanswered
maichmueller
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
I am a little confused as to whether or not I am supposed to link against ${Python3_LIBRARIES} manually when using pybind11 or whether pybind11 should automatically link it for me.
The point is that...
Case 1:
set
set(PYBIND11_FINDPYTHON TRUE)
and link againstpybind11::module
then pybind11 finds Python:but I get a whole host of linker errors from within pybind11 for Python API:
Linker error msgs
Case 2:
then I find Python3 again all the same,
yet linking only
pybind11::module
brings the same linker errors.However, once I also link
${Python3_LIBRARIES}
the linker errors are resolved and it compiles just fine.I can't imagine this being the expected behaviour, as this leaves
PYBIND11_FINDPYTHON
broken due to always needing to call FindPython manually to have Python3_LIBRARIES available. But I would like to ask here first: Is manual linking againstPython3_LIBRARIES
meant to be required or where am I missing a step?My setup is:
python3 python3-pip python3-dev
, so the deps are available)Conan
(the pkg manager).Beta Was this translation helpful? Give feedback.
All reactions