警告LNK4197:多次指定导出“ PyInit |
您所在的位置:网站首页 › 忽略editandcontinue › 警告LNK4197:多次指定导出“ PyInit |
本文介绍了警告LNK4197:多次指定导出“ PyInit_python_module_name”;使用第一规范的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
限时送ChatGPT账号..
我创建了一些 Cython 文件,并使用 I created some Cython files, and import them in a Python file using, import pyximport pyximport.install() import Cython_Mod1 import Cython_Mod2当我运行 py 文件时, C 编译器( VC ++ 14 )产生以下错误 When I run the py file, the C compiler (VC++14) generated the following errors Cython_Mod1.obj : warning LNK4197: export 'PyInit_Cython_Mod1' specified multiple times; using first specification。 如何解决此问题,是否会影响性能或执行过程中可能会出错。 How to fix this and does it affect the performance or can be erroneous in the execution. 推荐答案LNK4197 是警告,因此它不会影响 .c $ c $的编译c>文件, Cython 可能只是生成导出功能多次的代码(出于充分的理由,我想是这样)。 LNK4197 is a warning, as such it shouldn't affect the compilation of your .c files, Cython probably just generates code that exports that function multiple times (for good reasons, I'd assume). 因为 PyInit_< modname> 负责初始化模块;如果您的模块已初始化并正确导入,则不会有问题。它不会影响性能和/或导致错误执行。 Since PyInit_ is responsible for initializing the module; if your modules get initialized and imported correctly you have no issues. It won't affect the performance and/or result in erroneous execution. 这篇关于警告LNK4197:多次指定导出“ PyInit_python_module_name”;使用第一规范的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋! |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |