在c++安装程序中包含python

2024-10-04 01:35:46 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试将python嵌入到我的c++程序中。我已经将libs和python Include目录包含在项目的属性中。但是当我尝试运行c++程序时,我收到了一个错误: error LNK2019: unresolved external symbol _WinMain@16 referenced in function "int __cdecl __scrt_common_main_seh(void)" (?__scrt_common_main_seh@@YAHXZ)

还有:

 fatal error LNK1120: 1 unresolved externals

有人知道怎么解决这个问题吗?你知道吗

注意:我使用的是windows和visualstudio。你知道吗


Tags: 项目程序目录属性includemain错误error