Where is the libavformat for FFMpeg located on Snow Leopard?

You are having trouble getting the makefile to find the correct libraries and header files for the .c program I'm trying to compile. I am trying to compile an open source sequencer for Apple HTTP Live Streaming, and it requires libavformat and other FFMpeg libraries to compile it. I used Mac Ports to install FFMpeg, and when I run "what ffmpeg" on the command line, the directory that it shows is opt / local / bin / ffmpeg, but after searching, it doesn't look like the library directory.

The libraries seem to be located in opt / local / include, because that's where I see the header files. Here is my makefile with a suspicious directory:

all: gcc -Wall -g live_segmenter.c -o live_segmenter -I / opt / local / include -I / opt / local / bin -I / opt / local / include / libavutil -L / opt / local / include / libavformat - libavformat - L / opt / local / include -libavcodec -L / opt / local / include -libavutil -L / opt / local / include -libavcore -lbz2 -lm -lz -lfaac -lmp3lame -lx264 -lfaad -lpthread

clean:
rm -f live_segmenter

And here is the result after trying to compile:

gcc -Wall -g live_segmenter.c -o live_segmenter -I / opt / local / include -I / opt / local / bin - I / opt / local / include / libavutil -L / opt / local / include / libavformat -libavformat - L / opt / local / include -libavcodec -L / opt / local / include -libavutil -L / opt / local / include - libavcore -lbz2 -lm -lz -lfaac -lmp3lame -lx264 -lfaad -lpthread

ld: library not found for -libavformat
collect2: ld returned 1 exit status
make: *** [all] Error 1

"ffmpeg -version", , ffmpeg , , , . . !

+3
1

, -I -L. gcc (1) Lion:

-I dir 
   Add the directory dir to the list of directories to be searched for 
   header files.  Directories named by -I are searched before the standard
   system include directories.  If the directory dir is a standard system 
   include directory, the option is ignored to ensure that the default
   search order for system directories and the special treatment of system
   headers are not defeated.

 -L dir
   Add directory dir to the list of directories to be searched for -l.

-l<libname> - , ld lib<libname> -L.

:

gcc -Wall -g live_segmenter.c -o live_segmenter -I/opt/local/include -L/opt/local/lib -lavcodec -lavutil -lavcore -lbz2 -lm -lz -lfaac -lmp3lame -lx264 -lfaad -lpthread

+3

Source: https://habr.com/ru/post/1795394/


All Articles