boostorg / boostorg/python

Undefined symbol when importing module in python

Đang mở
#380 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
C++
Star
537
Fork
223
Merge trung bình
11 giờ 22 phút
Pull request đã merge (30 ngày)
2

Mô tả

Hi guys

I''m trying to use boost python and then I'm exposing simple class i get
undefined symbol: _ZN5boost6python15instance_holder8allocateEP7_objectmm

I checked symbols in libboost_python39.so.1.78.0 and i noticed that exist following symbol
_ZN5boost6python15instance_holder8allocateEP7_objectmmm (one m more than expected)

So am I doing sth wrong or this is a bug?

My class
```
struct ConnectionFactory
{
ConnectionFactory(){}
~ConnectionFactory(){}
};
```

Exposing by:
`class_("ConnectionFactory");`

Linux Ubuntu 18.04

EDIT:
I made a workaround, just modifying expected symbol using this
`objcopy --redefine-sym _ZN5boost6python15instance_holder8allocateEP7_objectmm=_ZN5boost6python15instance_holder8allocateEP7_objectmmm myFile.o`

And this is working, but i'm not sure if this is correct approach

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.