抱歉,我说英语不好。
我做了;
我制作示例代码参考libeXosip2-3.6.0的“sip_reg.c”
但是,Multi-Thread无法工作..(错误:“osip_thread_create()未声明。”)任何人都可以帮忙吗?
答案 0 :(得分:0)
我决定使用libosip2-4.0.0和libeXosip2-4.0.0
我做了;
1. Install pthreads-w32-2-9-1-release.tar.gz $ make clean GC - and copy to c:\develop\pthreads-w32 2. Complie libosip2-4.0.0 in MSYS with MinGW32 $ ./configure LDFLAGS="-L/c/develop/pthreads-w32" CPPFLAGS="-I/c/develop/pthreads-w32" LIBS="-lpthreadGC2" - modify include/osip2/internal.h : append "#define HAVE_PTHREAD_WIN32" on top - modify src/osip2/osip_time.c : like this.. #elif !defined(__PALMOS__) && defined(WIN32) .... static int _osip_gettimeofday_realtime (struct timeval *tp, void *tz) { return gettimeofday(tp, tz); } $ make && make install 3. Complie libeXosip2-4.0.0 in MSYS with MinGW32 $ ./configure LDFLAGS="-L/c/develop/pthreads-w32" CPPFLAGS="-I/c/develop/pthreads-w32" LIBS="-lpthreadGC2" - modify src/eXtl_tcp.c : refer to http://www.utterspeech.com/article/random-fixes/1 #ifdef WIN32 -#include <Mstcpip.h> +/* MinGW Fix: Replacement for Mstcpip.h */ + +struct tcp_keepalive { + ULONG onoff; + ULONG keepalivetime; + ULONG keepaliveinterval; +}; + +#define SIO_KEEPALIVE_VALS _WSAIOW(IOC_VENDOR,4) + #endif - modify src/eXtl_tcp.c : refer to http://www.utterspeech.com/article/random-fixes/1 #ifdef WIN32 -#include <Mstcpip.h> +/* MinGW Fix: #include <Mstcpip.h>*/ #include <wincrypt.h> #endif $ make && make install