Unexpected exit when use Visual Studio 2022
- Vorherrschende Sprache
- C++
- Sterne
- 537
- Forks
- 223
- Ø Merge
- 11 Std. 22 Min.
- Gemergte PRs (30 T.)
- 2
Beschreibung
I installed boost Python on Windows using vcpkg. And I successfully compiled my DLL file, but I don't know why Python always exits automatically after import the dll.
This is my code (dllmain.cpp):
```cpp
// dllmain.cpp : 定义 DLL 应用程序的入口点。
#include "pch.h"
#include
#include
#define BOOST_PYTHON_STATIC_LIB
#include
using namespace boost::python;
void test() {
std::cout << "Test" << std::endl;
}
BOOST_PYTHON_MODULE(Dll1)
{
boost::python::def("test", test);
}
```


This is my Visual Studio 2022 Config:



Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Bewertung
Dieses Issue wurde noch nicht bewertet.