Open yangxin6 opened 1 year ago
Interestingly, for my particular case it got fixed by using a conda's compiler. Originaly, my local compiler (GNU 13.1.1) was used. After I used conda's (GNU 11.3.0), the issue was fixed.
Not sure if this is helpful for your setup, but for anyone also compiling cpp files in the cmake. I added SHARED to add_library
and it worked.
For example:
add_library(${PROJECT_NAME} SHARED
src/datastructures/Graph.cpp
src/datastructures/SearchQueue.cpp
src/datastructures/State.cpp
)
Required prerequisites
What version (or hash if on master) of pybind11 are you using?
master
Problem description
When using cmake, the third-party library has interdependence and an error occurs. Looking forward to your reply.
Errors:
Complete cmakelists:
Reproducible example code
No response
Is this a regression? Put the last known working version here if it is.
Not a regression