[Nice] Trying to compile sdp-example under win32

Максим Ерёменко maksyarik at gmail.com
Mon Nov 18 03:45:29 PST 2013


Hello again, Gentlemen.
Update:
I'm trying to use old one Glib to compile sdp-example (the one, that
libnice was compiled with); I've finally managed to change parts of
sdp-example according to old GLib documentation and get rid of those
errors, yet, now I got some unresolved external symbol errors:

1>Nice.obj : error LNK2019: unresolved external symbol
_nice_agent_parse_remote_sdp referenced in function "void * __cdecl
example_thread(void *)" (?example_thread@@YAPAXPAX at Z)
1>Nice.obj : error LNK2019: unresolved external symbol
_nice_agent_generate_local_sdp referenced in function "void * __cdecl
example_thread(void *)" (?example_thread@@YAPAXPAX at Z)
1>Nice.obj : error LNK2019: unresolved external symbol
_nice_agent_set_stream_name referenced in function "void * __cdecl
example_thread(void *)" (?example_thread@@YAPAXPAX at Z)

I copied all the stuff, that I found in
libnice-0.1.4\win32\vs9\libnice\bin\Win32_Debug
folder and linked to all lib files, that I found there. Where I messed up?
Any ideas what can it be and how it can be fixed?


2013/11/12 Максим Ерёменко <maksyarik at gmail.com>

> Hello again.
> Update:
> I was trying 2 options:
>
> 1)To use latest GLib with sdp-example, I was trying to compile Libnice
> itself with latest Glib (2.34.3, got runtime and dev glib, runtime zlib and
> gettext from here http://www.gtk.org/download/win32.php); After trying to
> achieve this, I got plenty of compilation errors
> https://gist.github.com/anonymous/71e2a80e57eb4b8ae6c1
>
> 2)Also I was attempting to compile sdp-example with older 2.28 Glib, as
> this is Glib, with which Libnice supposed to be compiled, due to readme. At
> the end compiler gives me errors about 2 strings, that i can't fix;
>
> Errors:
> 1>c:\users\max\documents\visual studio
> 2010\projects\nice\nice\nice.cpp(65): error C2079: 'gather_mutex' uses
> undefined struct '_GMutex'
> 1>c:\users\max\documents\visual studio
> 2010\projects\nice\nice\nice.cpp(65): error C2079: 'negotiate_mutex' uses
> undefined struct '_GMutex'
> 1>c:\users\max\documents\visual studio
> 2010\projects\nice\nice\nice.cpp(66): error C2079: 'gather_cond' uses
> undefined struct '_GCond'
> 1>c:\users\max\documents\visual studio
> 2010\projects\nice\nice\nice.cpp(66): error C2079: 'negotiate_cond' uses
> undefined struct '_GCond'
>
> in the strings:
> static GMutex gather_mutex, negotiate_mutex;
> static GCond gather_cond, negotiate_cond;
>
> Yet, "go to definition (f12)" in VC++ 2010 and leads me to definition of
> GMutex or GCond in gthread.h
>
> My inclusion are
>
> #include <stdlib.h>
> #include <stdio.h>
> #include <string.h>
> #include <ctype.h>
>
> #include "agent.h"
> #include "glib.h"
> #include "glib/gthread.h"
> #include "WinBase.h"
>
> How can I fix any of the ways, mentioned above?
>
>
> 2013/10/16 Максим Ерёменко <maksyarik at gmail.com>
>
>> Hi everyone.
>> As header says - I encounter some problems, while trying to compile
>> sdp-example from examples folder under win32 via Visual Studio 2010 Express.
>> As i understand, despite the fact, that nicelib is crossplatform stuff,
>> this example was made for compilation under UNIX, And now, as I'm working
>> with win32, and, it seems, struggling from lack of knowledge, I hope you
>> can help me with some problems and questions in small list below:
>>
>> 1)error C2079: 'gather_mutex' ( and 'negotiate_mutex') uses undefined
>> struct '_GMutex' (same with gather_cond and negotiate_cond). Fixed by
>> making Gcond and Gmutex 'extern' instead of 'static', is it suitable fix?
>>
>> 2)error C3861: 'usleep': identifier not found. As i get it this one
>> declared in Unistd.h, that refers to UNIX system, let's assume that I can
>> replace it with some appropriate win32 function (I can, right?), or will
>> add needed UNIX headers.
>>
>> 3)error C3861: 'g_thread_new': identifier not found. This one is the most
>> unclear one for me. Due to my understanding, g_thread_new must be declared
>> somewhere in glib, but it seems that i just dont know what i need to
>> include, or maybe there is no g_thread_new in version of glib, that i get
>> from the link in REAME.win32 (2.28.8).
>> My inclusions are:
>> #include <stdlib.h>
>> #include <stdio.h>
>> #include <string.h>
>> #include <ctype.h>
>> #include <io.h>
>>
>> #include "agent.h"
>> #include "gio/gio.h"
>> #include "glib.h"
>> #include "gio-win32-2.0/gio/gwin32inputstream.h"
>> #include "gio-win32-2.0/gio/gwin32outputstream.h"
>>
>> Thanks for the help in advance.
>> Max.
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/nice/attachments/20131118/85c6e695/attachment.html>


More information about the nice mailing list