Skip to content

Conversation

@zhwesky2010
Copy link
Contributor

@zhwesky2010 zhwesky2010 commented Jul 21, 2021

PR types

New features

PR changes

Others

Describe

解决 #31459https://aistudio.baidu.com/paddle/forum/topic/show/964945 的Windows执行问题

支持 C++导入Python,Windows下的用户场景:将Paddle的深度学习能力,集成到 MFC/QT/C# 等桌面端软件环境中,修复以下问题:

  1. sys.argv在C++导入Python时会成为空list,导致第三方库glog调用sys.argv[0]时出现问题;
  2. sys.executable在C++导入Python时,并非为python解释器python.exe,而是最外层的C++可执行程序,但在Linux下无此问题,因为Windows上的Python/C API在获取 Py_GetProgramFullPath 时,与Linux表现不同,这个问题会导致Windows下出现 进程无限嵌套,直至系统崩溃

infoflow 2021-07-21 21-31-14

同时新增该应用场景下的C++单测

@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@zhwesky2010 zhwesky2010 force-pushed the support_cc_imppy branch 2 times, most recently from 370d457 to d6034ce Compare July 26, 2021 08:02
@zhwesky2010 zhwesky2010 force-pushed the support_cc_imppy branch 2 times, most recently from d6034ce to e863344 Compare July 26, 2021 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants