Describe the bug
In case you are using pybind11 with PYBIND11_FINDPYTHON, the debug build is failing with LINK : fatal error LNK1104: cannot open file 'python310.lib'.
Environment
- OS: Windows
- Compiler: MSVC 2022
To Reproduce
Steps to reproduce the behavior:
./vcpkg install pybind11
- Using following code:
CMakeLists.txt
cmake_minimum_required(VERSION 3.14...3.22)
project(test)
set(PYBIND11_FINDPYTHON ON)
find_package(pybind11 2.6 CONFIG REQUIRED)
add_executable(${PROJECT_NAME}
main.cpp
)
target_link_libraries(${PROJECT_NAME}
PRIVATE
pybind11::embed
)
main.cpp
#include <pybind11/embed.h>
int main(int argc, char** argv)
{
pybind11::scoped_interpreter guard{};
return 0;
}
Expected behavior
Linker should succeed.
Additional context
| |
Without vcpkg |
With vcpkg |
With PYBIND11_FINDPYTHON |
Build succeeded |
cannot open file 'python310.lib' |
Without PYBIND11_FINDPYTHON |
Build succeeded |
Build succeeded |
As the debug build works when not using vcpkg even when PYBIND11_FINDPYTHON is ON it looks like an vcpkg issue for me
Describe the bug
In case you are using
pybind11withPYBIND11_FINDPYTHON, the debug build is failing withLINK : fatal error LNK1104: cannot open file 'python310.lib'.Environment
To Reproduce
Steps to reproduce the behavior:
./vcpkg install pybind11CMakeLists.txtmain.cppExpected behavior
Linker should succeed.
Additional context
PYBIND11_FINDPYTHONcannot open file 'python310.lib'PYBIND11_FINDPYTHONAs the debug build works when not using vcpkg even when
PYBIND11_FINDPYTHONisONit looks like an vcpkg issue for me