osip-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[osip-dev] Errors when cross compiling libeXosip2 with MinGW cross envir


From: Simon Brenner
Subject: [osip-dev] Errors when cross compiling libeXosip2 with MinGW cross environment
Date: Thu, 05 Jul 2012 08:01:12 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20120606 Thunderbird/13.0

Hey all,

I'm trying to cross compile libeXosip2 (3.6.0) from my Linux PC for
Windows with the help of MXE (M cross environment, MinGW cross
environment, http://mxe.cc).

Well, actually my goal is to compile Linphone for Windows (from Linux)
but therefore, I need libeXosip2 (as well as libosip2).

I created the needed Makefiles for libosip2 (which went well) and for
libeXosip2. With the latter I get the build error:

------------------------------------------------------------
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
------------------------------------------------------------

This is correct, because when running into the
#else of
#ifdef IPV6_TCLASS
retval is really not declared.

So I created the patch:

--- libeXosip2-3.6.0.orig/src/eXtl_udp.c        2011-10-04 09:56:59.000000000 
+0200
+++ libeXosip2-3.6.0/src/eXtl_udp.c     2012-07-05 07:20:40.824943891 +0200
@@ -73,7 +73,7 @@

 static int udp_tl_open(void)
 {
-       int res;
+       int res, retval;
        struct addrinfo *addrinfo = NULL;
        struct addrinfo *curinfo;
        int sock = -1;

which works well.

But now I'm running to the following error(s):

------------------------------------------------------------
/bin/sh ../libtool --tag=CC   --mode=compile i686-pc-mingw32-gcc
-DHAVE_CONFIG_H -I. -I.. -I.. -I../include
-I/opt/mxe/usr/i686-pc-mingw32/include    -Wall -Wcast-align
-Wchar-subscripts -Wformat -Winline -Wmissing-declarations
-Wmissing-prototypes -Wnested-externs -Wpointer-arith -DSRV_RECORD
-pedantic -DENABLE_DEBUG -g -DENABLE_TRACE -g    -g  -MT eXtl_tcp.lo -MD
-MP -MF .deps/eXtl_tcp.Tpo -c -o eXtl_tcp.lo eXtl_tcp.c

libtool: compile:  i686-pc-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -I..
-I../include -I/opt/mxe/usr/i686-pc-mingw32/include -Wall -Wcast-align
-Wchar-subscripts -Wformat -Winline -Wmissing-declarations
-Wmissing-prototypes -Wnested-externs -Wpointer-arith -DSRV_RECORD
-pedantic -DENABLE_DEBUG -g -DENABLE_TRACE -g -g -MT eXtl_tcp.lo -MD -MP
-MF .deps/eXtl_tcp.Tpo -c eXtl_tcp.c -o eXtl_tcp.o

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.

make[4]: *** [eXtl_tcp.lo] Error 1
------------------------------------------------------------

This seem to be two errors: The conflicting types and the lack of Mstcpip.h.

Any hints??

Thanks,

-Simon.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]