[Ffmpeg-devel] [PATCH] pthreads-w32 check

angustia at arrozcru.no-ip.org angustia
Sat Feb 24 18:45:00 CET 2007


Quoting M?ns Rullg?rd <mans at mansr.com>:

> ramiro at lisha.ufsc.br writes:
>
>> Hello,
>>
>> Attached patch correctly checks for pthreads-w32 in its many formats.
>> (void) $func on check_func2 didn't do the trick. Args must be passed.
>
> Why?
>

Statically built pthreads-w32 don't use __declspec(dllimport). When  
you include the library, it assumes it's a dll (unless  
PTW32_STATIC_LIB is defined) and tries to use __declspec(dllimport).  
In a dll, the function it should link to is _imp_$func.

For some reason, (void)$func makes it ok to link, where it should fail  
on the static libs.

>> Changed last check_lib -lpthread to check_lib2 (should work on linux the
>> same way).
>> It then checks for -lpthreadGC2 (the one to be used with gcc), and if all
>> fails, it checks for the static library of pthreadGC2 (which must have
>> that define and those libraries).
>
> What is pthreadGC2?  Never heard of that.
>

pthreads-w32 libs aren't simply called libpthread. They're  
libpthreadGC2 (if they are to be used with c cleanup code) and  
libpthreadGCE2 (for c++ exception handling).

>> If x264 is built with pthreads-w32, it must also have those extra
>> libraries, so the order does matter. add_extralibs is not enough.
>
> This should be solved some other way.
>
[...]





More information about the ffmpeg-devel mailing list