Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mkdir build
- gcc -g -Wall -o build/hello_world -lavformat -lavcodec -lswscale -lavutil -lz 0_hello_world.c \
- && ./build/hello_world small_bunny_1080p_60fps.mp4
- 0_hello_world.c: In function โmainโ:
- 0_hello_world.c:35:3: warning: โav_register_allโ is deprecated [-Wdeprecated-declarations]
- av_register_all();
- ^~~~~~~~~~~~~~~
- In file included from 0_hello_world.c:15:0:
- /usr/local/include/libavformat/avformat.h:2033:6: note: declared here
- void av_register_all(void);
- ^~~~~~~~~~~~~~~
- /tmp/ccbsfyh8.o: In function `av_make_error_string':
- /usr/local/include/libavutil/error.h:111: undefined reference to `av_strerror'
- /tmp/ccbsfyh8.o: In function `main':
- /home/xultz/libav/ffmpeg-libav-tutorial/0_hello_world.c:35: undefined reference to `av_register_all'
- /home/xultz/libav/ffmpeg-libav-tutorial/0_hello_world.c:40: undefined reference to `avformat_alloc_context'
- /home/xultz/libav/ffmpeg-libav-tutorial/0_hello_world.c:54: undefined reference to `avformat_open_input'
- /home/xultz/libav/ffmpeg-libav-tutorial/0_hello_world.c:73: undefined reference to `avformat_find_stream_info'
- /home/xultz/libav/ffmpeg-libav-tutorial/0_hello_world.c:103: undefined reference to `avcodec_find_decoder'
- /home/xultz/libav/ffmpeg-libav-tutorial/0_hello_world.c:125: undefined reference to `avcodec_alloc_context3'
- /home/xultz/libav/ffmpeg-libav-tutorial/0_hello_world.c:134: undefined reference to `avcodec_parameters_to_context'
- /home/xultz/libav/ffmpeg-libav-tutorial/0_hello_world.c:142: undefined reference to `avcodec_open2'
- /home/xultz/libav/ffmpeg-libav-tutorial/0_hello_world.c:149: undefined reference to `av_frame_alloc'
- /home/xultz/libav/ffmpeg-libav-tutorial/0_hello_world.c:156: undefined reference to `av_packet_alloc'
- /home/xultz/libav/ffmpeg-libav-tutorial/0_hello_world.c:180: undefined reference to `av_packet_unref'
- /home/xultz/libav/ffmpeg-libav-tutorial/0_hello_world.c:168: undefined reference to `av_read_frame'
- /home/xultz/libav/ffmpeg-libav-tutorial/0_hello_world.c:185: undefined reference to `avformat_close_input'
- /home/xultz/libav/ffmpeg-libav-tutorial/0_hello_world.c:186: undefined reference to `avformat_free_context'
- /home/xultz/libav/ffmpeg-libav-tutorial/0_hello_world.c:187: undefined reference to `av_packet_free'
- /home/xultz/libav/ffmpeg-libav-tutorial/0_hello_world.c:188: undefined reference to `av_frame_free'
- /home/xultz/libav/ffmpeg-libav-tutorial/0_hello_world.c:189: undefined reference to `avcodec_free_context'
- /tmp/ccbsfyh8.o: In function `decode_packet':
- /home/xultz/libav/ffmpeg-libav-tutorial/0_hello_world.c:207: undefined reference to `avcodec_send_packet'
- /home/xultz/libav/ffmpeg-libav-tutorial/0_hello_world.c:218: undefined reference to `avcodec_receive_frame'
- /home/xultz/libav/ffmpeg-libav-tutorial/0_hello_world.c:230: undefined reference to `av_get_picture_type_char'
- /home/xultz/libav/ffmpeg-libav-tutorial/0_hello_world.c:242: undefined reference to `av_frame_unref'
- collect2: error: ld returned 1 exit status
- Makefile:4: recipe for target 'hello_world' failed
- make: *** [hello_world] Error 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement