On date Friday 2009-07-10 18:22:11 +0200, Muhammad Ali encoded: > Quoting Muhammad Ali <[email protected]>: > >> Hello every one, >> >> i configure my ffmpeg with >> >> configuration: --enable-gpl --enable-libx264 --shlibdir=/usr/local/lib >> --enable-pthreads --disable-demuxer=MATROSKA_DEMUXER >> --disable-muxer=MATROSKA_MUXER >> >> When i compile our program i find the error.... like >> >> /home/zeshan/video_encod.c:143: undefined reference to `img_convert' >> /usr/local/lib/libavformat.a(matroskadec.o): In function >> `matroska_decode_buffer': >> /home/zeshan/ffmpeg/libavformat/matroskadec.c:917: undefined reference >> to `BZ2_bzDecompressInit' >> /home/zeshan/ffmpeg/libavformat/matroskadec.c:926: undefined reference >> to `BZ2_bzDecompress' >> /home/zeshan/ffmpeg/libavformat/matroskadec.c:929: undefined reference >> to `BZ2_bzDecompressEnd' >> collect2: ld returned 1 exit status >> >> >> my compilation command is----- >> gcc -o video_encod video_encod.c -I. -I usr/local/include -L >> usr/local/lib -l avformat -l avcodec -l avutil -l x264 -lz -lm
That's not the supposed way to provide to make / gcc the correct LD/CFLAGS. Have a look at the pkg-config tool, ffmpeg provides its own pkg-config files, also remember to meaningflly set PKG_CONFIG_PATH, what you need insted is something such as: pkg-config --libs --cflags libavformat I don't know if there are better ways, certainly pkg-config has its own shortcomings yet its better than non-portably hand-craft those flags. >> if you have any soulation please response me..... >> > > ok i add the -l bz2 so its compiled but i have error > > undefined reference to img_convert > whats the problem why its show undefined reference to img_convert .. > have any solution please tell me... Regards. _______________________________________________ libav-user mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/libav-user
