您的位置:首页 > 其它

带属性的向前声明:warning: type attributes are honored only at type definition

2012-12-11 17:01 411 查看
带属性的向前声明:

class __attribute__((__dllexport__)) X;

执行

g++ -c -g x.cpp

编译会收到如下warning:

warning: type attributes are honored only at type definition

使用的GCC版本为:4.1.2,如果是GCC 4.5.1,则warning变更为:

warning: ‘__dllexport__’ attribute directive ignored
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐