简体   繁体   English

SWIG for C ++,未找到符号:预期用于:平面名称空间

[英]SWIG for C++, Symbol not found: Expected in: flat namespace

I have a problem with loading the Python library I created by creating a Python API for a C++ project. 我在加载通过为C ++项目创建Python API而创建的Python库时遇到问题。 When I load it into Python I get an error with Symbol not found:... Expected in: flat namespace... 当我将其加载到Python中时,出现未找到Symbol的错误:...预期格式:平面名称空间...

EDIT: I have given the solution to my problem below. 编辑:我已经给我下面的问题的解决方案。

When I have been looking around, it seemed that the problem most likely is due to linking with incompatible libraries. 当我环顾四周时,似乎该问题很可能是由于与不兼容的库链接所致。 However, I have discovered that it actually was due to using an abstract class without an implementation code. 但是,我发现这实际上是由于使用了没有实现代码的抽象类。 That is, SWIG seems not be able to create a Python wrapper from a class declaration without implemented methods. 也就是说,如果没有实现的方法,SWIG似乎无法从类声明创建Python包装器。 I put it here so that anyone else having the same problem will find it. 我将其放在此处,以便其他有相同问题的人都能找到它。 /Tomas /托马斯

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 符号未找到,预期在:平面命名空间 - Symbol not found, Expected in: flat namespace 在平面名称空间中找不到预期的ImportError dlopen()符号 - Importerror dlopen () symbol not found expected in flat namespace 找不到符号:_mpfr_acos,应在以下位置输入:平面名称空间 - Symbol not found: _mpfr_acos, Expected in: flat namespace MacOSX + Boost_Python + PyFTGL: - 未找到符号,预期在:flat namespace - MacOSX + Boost_Python + PyFTGL :- Symbol not found, expected in: flat namespace 如何解决ImportError: dlopen(): Symbol not found:.... Expected in: flat namespace - How to solve ImportError: dlopen(): Symbol not found:.... Expected in: flat namespace “符号未找到/预期位于:平面名称空间”实际上是什么意思? - What does "Symbol not found / Expected in: flat namespace" actually mean? 带有C ++模板的SWIG:未定义的符号 - SWIG with C++ templates: undefined symbol 使用 pdftotext 导入错误 - 在平面命名空间中找不到符号 - Import error using pdftotext - symbol not found in flat namespace SWIG C ++ Python构造函数错误类型(可能的命名空间问题) - SWIG c++ python constructor wrong type (possible namespace issue) Apple M1 运行 Django 在平面命名空间“_PQbackendPID”中找不到显示符号 - Apple M1 run Django display symbol not found in flat namespace '_PQbackendPID'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM