osip-dev
[Top][All Lists]
Advanced

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

Re: [osip-dev] Errors when cross compiling libeXosip2 with MinGW cross e


From: Aymeric Moizard
Subject: Re: [osip-dev] Errors when cross compiling libeXosip2 with MinGW cross environment
Date: Thu, 5 Jul 2012 15:10:58 +0200

Hi Simon,

2012/7/5 Simon Brenner <address@hidden>
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).


Have you tried a compilation from mingw on windows for windows? Is
this one broken too? 

I guess it used to compile correctly on windows for windows, but then I'm
not sure the best way to fix it

 About errors:

1/ retval is missing... This is fixed in new version (multireg branch -> 4.0.0 version),
    but may be not in "master" branch..

2/ I guess I should add some kind of #ifdeffor the closesocket issue. However,
   I have no idea which one would be needed for your use case.

3/ It's strange that "Mstcpip.h" is missing (is it also missing on mingw compilation
   on windows/for windows... I have no answer too, because I'm using visual studio...)

Sorry for not helping more. I'm also working with 4.0.0 (git branch multireg for exosip
and git branch osip4 for osip).. But I guess the issue should remain in those versions.

If you have any proper solution, let me know!

Regards,
Aymeric

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.

_______________________________________________
osip-dev mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/osip-dev



--
Antisip - http://www.antisip.com


reply via email to

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