yes , I use above gcc syntax : gcc -g doc/examples/muxing.c -o muxing -lavcodec -lavdevice -lavfilter -lavformat -lavutil -lswscale -lswresample -lpostproc -lx264 -lmp3lame -lz -liconv -lbz2
but again I got maximum errors , Can anybody help me and give proper procedure to use ffmpeg API in my C program . On Thu, Sep 17, 2015 at 2:26 PM, Clément Bœsch <u...@pkh.me> wrote: > On Thu, Sep 17, 2015 at 04:47:48PM +0800, Steven Liu wrote: > > You can reference the doc/example file makefile > > > > gcc -I. -I./ -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE > > -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DZLIB_CONST -std=c99 > > -fomit-frame-pointer -pthread -g -Wdeclaration-after-statement -Wall > > -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wwrite-strings > > -Wtype-limits -Wundef -Wmissing-prototypes -Wno-pointer-to-int-cast > > -Wstrict-prototypes -Wempty-body -Wno-parentheses -Wno-switch > > -Wno-format-zero-length -Wno-pointer-sign -O3 -fno-math-errno > > -fno-signed-zeros -fno-tree-vectorize -Werror=format-security > > -Werror=implicit-function-declaration -Werror=missing-prototypes > > -Werror=return-type -Werror=vla -Wformat -fdiagnostics-color=auto > > -Wno-maybe-uninitialized -c -o doc/examples/transcoding.o > > doc/examples/transcoding.c > > > > gcc -Llibavcodec -Llibavdevice -Llibavfilter -Llibavformat > -Llibavresample > > -Llibavutil -Llibpostproc -Llibswscale -Llibswresample -Wl,--as-needed > > -Wl,-z,noexecstack -Wl,--warn-common > > > -Wl,-rpath-link=libpostproc:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil:libavresample > > -o doc/examples/transcoding_g doc/examples/transcoding.o -lavdevice > > -lavfilter -lavformat -lavcodec -lpostproc -lswresample -lswscale > -lavutil > > -lXv -lX11 -lXext -lva -lva-x11 -lva -lxcb -lxcb-shm -lxcb -lxcb-xfixes > > -lxcb-render -lxcb-shape -lxcb -lxcb-shape -lxcb -lX11 -lx264 -lmp3lame > > -lfaac -lm -lz -pthread > > > > > > > > > > the simple is looks like : > > gcc -g doc/examples/muxing.c -o muxing -lavcodec -lavdevice -lavfilter > > -lavformat -lavutil -lswscale -lswresample -lpostproc -lx264 -lmp3lame > -lz > > -liconv -lbz2 > > > > No. You should NEVER explicit the libraries and sub dependency libraries > by yourself (because it's build and installation dependent). See how it's > done in the Makefile. > > [...] > > -- > Clément B. > > _______________________________________________ > ffmpeg-user mailing list > ffmpeg-user@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-user > > _______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user