soltanis
June 11th, 2010, 04:37 AM
I'm trying to build some source code that depends on the avcodec, avutil, and avformat libraries. Because the Ubuntu packages are slow to keep pace with ffmpeg and haven't incorporated libvpx (VP8 support) yet, I downloaded and built FFmpeg from the subversion repositories. I used checkinstall to install the package.
EDIT:
This wasn't clear before; I'm not building FFmpeg, this is a C program which depends on the avformat library.
I've removed the libavcodec-dev (and associated) packages from my system, but when trying to build I get the following slew of errors:
gcc -o oggment oggment.c -lavcodec -lavutil -lavformat 2>&1| head
/usr/local/lib/libavformat.a(concat.o): In function `concat_open':
/home/soltanis/Documents/code/ffmpeg/ffmpeg/libavformat/concat.c:67: undefined reference to `av_strstart'
/home/soltanis/Documents/code/ffmpeg/ffmpeg/libavformat/concat.c:99: undefined reference to `av_strlcpy'
/usr/local/lib/libavformat.a(rl2.o): In function `rl2_read_seek':
/home/soltanis/Documents/code/ffmpeg/ffmpeg/libavformat/rl2.c:277: undefined reference to `av_rescale_q'
/usr/local/lib/libavformat.a(allformats.o): In function `av_register_all':
/home/soltanis/Documents/code/ffmpeg/ffmpeg/libavformat/allformats.c:47: undefined reference to `avcodec_register_all'
/usr/local/lib/libavformat.a(anm.o): In function `read_header':
/home/soltanis/Documents/code/ffmpeg/ffmpeg/libavformat/anm.c:88: undefined reference to `av_log_ask_for_sample'
/home/soltanis/Documents/code/ffmpeg/ffmpeg/libavformat/anm.c:168: undefined reference to `av_log_ask_for_sample'
(oggment.c is the file).
As you can see, the library build directory is being barfed into there. Any suggestions on how I could solve this without having to go back to the Ubuntu packages?
EDIT: Just noticed this too, but should I be trying to use shared libraries (I notice it's linking against static libraries)? Also, should I be compiling with these libraries in a certain order?
EDIT:
This wasn't clear before; I'm not building FFmpeg, this is a C program which depends on the avformat library.
I've removed the libavcodec-dev (and associated) packages from my system, but when trying to build I get the following slew of errors:
gcc -o oggment oggment.c -lavcodec -lavutil -lavformat 2>&1| head
/usr/local/lib/libavformat.a(concat.o): In function `concat_open':
/home/soltanis/Documents/code/ffmpeg/ffmpeg/libavformat/concat.c:67: undefined reference to `av_strstart'
/home/soltanis/Documents/code/ffmpeg/ffmpeg/libavformat/concat.c:99: undefined reference to `av_strlcpy'
/usr/local/lib/libavformat.a(rl2.o): In function `rl2_read_seek':
/home/soltanis/Documents/code/ffmpeg/ffmpeg/libavformat/rl2.c:277: undefined reference to `av_rescale_q'
/usr/local/lib/libavformat.a(allformats.o): In function `av_register_all':
/home/soltanis/Documents/code/ffmpeg/ffmpeg/libavformat/allformats.c:47: undefined reference to `avcodec_register_all'
/usr/local/lib/libavformat.a(anm.o): In function `read_header':
/home/soltanis/Documents/code/ffmpeg/ffmpeg/libavformat/anm.c:88: undefined reference to `av_log_ask_for_sample'
/home/soltanis/Documents/code/ffmpeg/ffmpeg/libavformat/anm.c:168: undefined reference to `av_log_ask_for_sample'
(oggment.c is the file).
As you can see, the library build directory is being barfed into there. Any suggestions on how I could solve this without having to go back to the Ubuntu packages?
EDIT: Just noticed this too, but should I be trying to use shared libraries (I notice it's linking against static libraries)? Also, should I be compiling with these libraries in a certain order?