xiehuc / pidgin-lwqq

a pidgin plugin based on lwqq, a excellent safe useful library for webqq protocol
GNU General Public License v3.0
660 stars 185 forks source link

编译错误:redefinition of typedef "LwqqMsgContent" #141

Closed lainme closed 11 years ago

lainme commented 11 years ago

在Ubuntu lucid/natty 上编译 preview 分支的时候遇到如下错误

 [ 4%] Building C object src/CMakeFiles/webqq.dir/background.c.o
 In file included from /home/lainme/Downloads/pidgin-lwqq/src/qq_types.h:7,
                       from /home/lainme/Downloads/pidgin-lwqq/src/background.c:1:
 /home/lainme/Downloads/pidgin-lwqq/src/liblwqq/msg.h:72: error: redefinition of typedef ‘LwqqMsgContent’
 /home/lainme/Downloads/pidgin-lwqq/src/liblwqq/type.h:30: note: previous declaration of ‘LwqqMsgContent’ was here 

但是在 natty 以上的版本中并没有。lucid 上 gcc 版本是 4.4.3, natty 上是 4.5.2,之后的版本都在 gcc 4.6 以上。

似乎是 gcc 4.6 做了改动,允许在C中使用 typdef struct foo foo 这样的定义 (标准更新?)。而 gcc 4.6 以前对 C 是不允许的

xiehuc commented 11 years ago

恩。是重定义。我去改改。

2012/12/17 lainme notifications@github.com

在Ubuntu lucid/natty 上编译 preview 分支的时候遇到如下错误

[ 4%] Building C object src/CMakeFiles/webqq.dir/background.c.o In file included from /home/lainme/Downloads/pidgin-lwqq/src/qq_types.h:7, from /home/lainme/Downloads/pidgin-lwqq/src/background.c:1: /home/lainme/Downloads/pidgin-lwqq/src/liblwqq/msg.h:72: error: redefinition of typedef ‘LwqqMsgContent’ /home/lainme/Downloads/pidgin-lwqq/src/liblwqq/type.h:30: note: previous declaration of ‘LwqqMsgContent’ was here

但是在 natty 以上的版本中并没有。lucid 上 gcc 版本是 4.4.3, natty 上是 4.5.2

似乎是 gcc 4.6 做了改动,允许在C中使用 typdef struct foo foo 这样的定义 (标准更新?)。而 gcc 4.6 以前对 C 是不允许的

— Reply to this email directly or view it on GitHubhttps://github.com/xiehuc/pidgin-lwqq/issues/141.

lainme commented 11 years ago

Thanks, fixed