Chinaunix首页 | 论坛 | 博客
  • 博客访问: 8032812
  • 博文数量: 594
  • 博客积分: 13065
  • 博客等级: 上将
  • 技术积分: 10324
  • 用 户 组: 普通用户
  • 注册时间: 2008-03-26 16:44
个人简介

推荐: blog.csdn.net/aquester https://github.com/eyjian https://www.cnblogs.com/aquester http://blog.chinaunix.net/uid/20682147.html

文章分类

全部博文(594)

分类: C/C++

2012-12-11 17:01:45

带属性的向前声明:

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



阅读(3182) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~