boostorg / boostorg/python

Unexpected exit when use Visual Studio 2022

オープン
#389 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
C++
スター
537
フォーク
223
平均マージ
11時間 22分
マージ済み PR(30日)
2

説明

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);
}
```
![屏幕截图 2022-07-04 164552](https://user-images.githubusercontent.com/46292984/177118025-a30fc298-f14a-4cd3-add0-ea13fe2a61cf.png)
![屏幕截图 2022-07-04 164750](https://user-images.githubusercontent.com/46292984/177119124-f13c3d88-4e5d-4a51-9ed9-0be0e6357d07.png)
This is my Visual Studio 2022 Config:
![屏幕截图 2022-07-04 164905](https://user-images.githubusercontent.com/46292984/177119173-80d57bec-6d9a-4d1f-b89a-c2cfcf08071b.png)
![屏幕截图 2022-07-04 164926](https://user-images.githubusercontent.com/46292984/177119192-e7dd9407-5cae-43bb-afbd-3c1f0ae53874.png)
![屏幕截图 2022-07-04 164952](https://user-images.githubusercontent.com/46292984/177119202-1e9bb984-2075-480f-b835-d09b2550f2ca.png)

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。