Rakesh Singh
Rakesh Singh

Reputation: 868

Builing ffmpeg with libx264 enabled on cygwin

I am trying to build ffmpeg (0.6.1 release) with libx264 for h.264 support on windows platform over cygwin environment.

I compiled x264-snapshot-20101228-2245 and installed the library in /usr/local/lib/(libx264.a). The configure option here (./configure --enable-shared --disable-asm )

Now I am trying to build ffmpeg with below configure option:

./configure --enable-shared --disable-static --enable-pthreads --enable-libx264 --enable-gpl --disable-doc --enable-memalign-hack --extra-ldflags=/usr/local/lib

But configure is giving error. shell: ERROR: libx264 not found

++++++++++++++++++++ config.err

gcc -o /tmp/ffconf.ww1dJh1K.exe /tmp/ffconf.X7919VWP.o -lpsapi -lz -lbz2 -lm -lx264 -lm
/usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../../i686-pc-cygwin/bin/ld: cannot find -lx264
collect2: ld returned 1 exit status
ERROR: libx264 not found
++++++++++++++++++++++

Tools Details Gcc version : gcc (GCC) 4.3.4 20090804 (release) 1

I will be glad if somebody points out the issue here.

Upvotes: 2

Views: 3596

Answers (3)

xiaoym
xiaoym

Reputation: 41

On Windows, you should use

--extra-ldflags=/LIBPATH:path_to_lib_file

Upvotes: 0

jocrag
jocrag

Reputation: 1

Have you tried adding --enable-memalign-hack to the configure flags

Upvotes: 0

Jiahao Chen
Jiahao Chen

Reputation: 926

Try --extra-ldflags="-L /usr/local/lib". If that doesn't help, try LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH ./configure ...

Upvotes: 4

Related Questions