【发布时间】:2017-10-06 01:20:16
【问题描述】:
我正在尝试使用 -fvisibility=hidden 进行编译,但无法弄清楚如何更改 boost::error_info typedef 的可见性,有人可以启发我吗?无论我将 DVEM_EXPORT 放在 typedef 行中的哪个位置,编译器都会拒绝它,除了编辑 boost 标头以在其中添加属性之外,别无其他可以解决运行时问题。
#ifdef....
#define DVEM_EXPORT __attribute__((visibility("default")))
....
class DVEM_EXPORT UnsupportedDataTypeException : public dv::BaseException<> {};
struct DVEM_EXPORT errinfo_data_type_ {};
typedef boost::error_info<errinfo_data_type_, std::string> errinfo_data_type;
【问题讨论】:
标签: c++ gcc boost visibility