[英]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.