[MEncoder-users] Compiling in Windows

John Brown johnbrown105 at hotmail.com
Sat Feb 14 16:25:59 CET 2009


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

> 
> It's been said in this list before that you'd have to be an idiot if you 
> can't compile Mplayer and Mencoder from source.

Really? Who said that?

> Therefore, I am an 
> idiot. I am not a programmer and have zero experience with compiling 
> things.

There *is* one poster who insists that you have to be a programmer to
compile MPlayer on Windows, but this is not true.

> Here's what I've done:

> /* stuff that seemed to work snipped  */

> However, mencoder doesn't seem to know what x264 is. 

/* Various indicators of this snipped */

> I noticed as configure was running the following message go by:
>         Checking for x264 ... no (in libavcodec: no)
> And looking in configure.log I saw this:
> 
> ============ Checking for x264 ============
> 
> #include <inttypes.h>
> #include <x264.h>
> #if X264_BUILD < 59
> #error We do not support old versions of x264. Get the latest from SVN.
> #endif
> int main(void) { x264_encoder_open((void*)0); return 0; }
> 
> gcc -Wall -Wno-switch -Wpointer-arith -Wredundant-decls -O4 
> -march=native -mtune=native -pipe -ffast-math -fomit-frame-pointer -I.  
> -Ilibdvdread4   -lwinmm -lws2_32 -liconv -lpng -lz -ljpeg -lgif -lz 
> -lbz2 -lmad -lspeex -ldts -lmpcdec -ladvapi32 -lole32 -lxvidcore -lm  
> -lopengl32 -lgdi32 -lgdi32 -lwinmm -ld3d9 -lgdi32 -lfaac  -lfaac -o 
> /tmp/mplayer-conf-8512-1648.exe /tmp/mplayer-conf-29628-1648.c
> -lx264
> c:/mingw/bin/../lib/gcc/i686-pc-mingw32/4.2.4/../../../libx264.a(encoder.o):
(.text+0x2243): 
> undefined reference to
> `pthread_join'

/* lots of references to undefined pthreads functions snipped */
> 
> Looking in the various MinGW folders, I do indeed have bin/x264.exe, 
> include/x264.h, and lib/libx264.a, so I am reasonably confident that I 
> have the various x264 bits that the compiler is looking for but 
> something about the pthread thing is not right. :(
> 
> Buh... so, what do I need to do to make this work? I have a sense that I 
> am *this* close, but I am really at a loss as to what to do to fix this.
> 


You need pthreads. Download it at http://sourceware.org/pthreads-win32/.
I recommend that you download the source and compile it yourself. I also 
recommend that you build the DLL version rather than the static library.

Copy the pthread headers (.h) to \MinGW\include, the import library
(lib*.a) to \MinGW\lib, and the pthread DLL to \MinGW\bin if the
pthreads build system does not do it for you.

After that, go to your MPlayer source directory and run
'make clean' (or 'make distclean' to be safe) then run 'configure' again.

Or you could not bother with pthreads, and instead 'make clean' and then
add --disable-pthreads to your configure command.

HTH.




More information about the MEncoder-users mailing list