[libnice] Libnice 0.1.17 windows build bug

B Andrei yo8tot at yahoo.com
Fri Aug 22 07:03:43 PDT 2014


I finally managed to run simple_example in windows. There is an missing initialization in code. The function getaddrinfo() in address.c at line 93 return a != 0 value. This is because winsock was not initialized first. Initialization is done with WSAStartup in nice_interfaces_get_WSA_socket()  ( in interfaces.c). But the nice_interfaces_get_WSA_socket()  is inside a #if 0 statement. I just add the following code at the beginning of main:

    WORD wVersionRequested;
    WSADATA wsaData;
    int err;
    wVersionRequested = MAKEWORD(2, 0);
    err = WSAStartup(wVersionRequested, &wsaData);
        if (err != 0) {
            printf("\n\nError : Could not start the winsocket engine\n\n");

Maybe this info could be helpful to somebody

The hole project (without this fix) is uploaded here:

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/nice/attachments/20140822/13b5896f/attachment.html>

More information about the nice mailing list