环境:mingw gcc 4.5.2
exosip2-3.6.0
osip2的编译过程就不说了,下面直接进正题,解决以下错误:
eXtl_udp.c:181:3: error: 'retval' undeclared (first use in this function)
eXtl_udp.c:181:3: note: each undeclared identifier is reported only once
for each function it appears in
In file included from
/opt/mxe/usr/lib/gcc/i686-pc-mingw32/4.7.0/../../../../i686-pc-mingw32/include/fcntl.h:20:0,
from eXtl_tcp.c:29:
/opt/mxe/usr/lib/gcc/i686-pc-mingw32/4.7.0/../../../../i686-pc-mingw32/include/io.h:443:37:
error: conflicting types for 'closesocket'
In file included from eXosip2.h:43:0,
from eXtl_tcp.c:25:
/opt/mxe/usr/lib/gcc/i686-pc-mingw32/4.7.0/../../../../i686-pc-mingw32/include/winsock2.h:538:32:
note: previous declaration of 'closesocket' was here
eXtl_tcp.c:33:21: fatal error: Mstcpip.h: No such file or directory
compilation terminated.
好了,遇到这些问题,大家应该和我刚开始遇到一样,有点发晕了吧,直接上patch
retval未定义,这个简单吧: