[MEncoder-users] Compiling in Windows

John Brown johnbrown105 at hotmail.com
Sat Feb 14 16:50:42 CET 2009


James Hastings-Trew <jimht <at> shaw.ca> writes:

> 
> > _______________________________________________
> >   
> I do have a includes/pthread.h and a lib/libpthreadGC2.a file in my 
> setup, but examining the configure.log file I see this:
> 
> ============ Checking for pthread ============
> 
> #include <pthread.h>
> void* func(void *arg) { return arg; }
> int main(void) { pthread_t tid; return pthread_create(&tid, 0, func, 0) 
> == 0 ? 0 : 1; }
> 
> gcc -Wall -Wno-switch -Wpointer-arith -Wredundant-decls -O4 
> -march=native -mtune=native -pipe -ffast-math -fomit-frame-pointer 
> -I.    -lwinmm -lws2_32   -o /tmp/mplayer-conf-7739-3396.exe 
> /tmp/mplayer-conf-2683-3396.c -lpthreadGC2
> C:/DOCUME~1/James/LOCALS~1/Temp/ccfFHeL0.o:mplayer-conf-2683-3396.c:(.text
+0x44): 
> undefined reference to `_imp__pthread_create'
> collect2: ld returned 1 exit status
> 
> and a bunch of variations on that...
> 

YOu have to make sure that:

1) libpthreadGC2.a is in the library search path. Assuming that you installed
   MinGW in C:\MinGW, that would be C:\MinGW\lib, and not some other directory
   like /usr/lib or /usr/local/lib
OR

2) You can try configure --extra-libs='-L/directory/containing/libpthreadGC2.a -
lpthreadGC2', or otherwise tell the configure script where to find the pthreads 
library.

It is also possible that you have the static library installed, in which case
the function names won't have the _imp__ prefix, and the linker won't find
them. Run 'nm libpthreadGC2.a" to see the names of the functions in the
library.
   





More information about the MEncoder-users mailing list