[Libav-user] ld error code 1 while make

Дмитрий Кулешов melorn at bk.ru
Thu May 5 09:01:02 CEST 2011


Hi. I've used libav in my project in 2009 and everything was fine until I decided to reinstall my program now. 
When I'm trying to do `make` for my project I've got the following:

nauro at nauro:~/work/AllViewProject/Season_2/VPCnew$ make
g++ -c -pipe -g -Wall -W -O2 -D_REENTRANT  -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED -DQT_TABLET_SUPPORT -I/usr/share/qt3/mkspecs/default -I. -I. -IAVSDK -I/usr/include/qt3 -o main.o main.cpp
g++ -c -pipe -g -Wall -W -O2 -D_REENTRANT  -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED -DQT_TABLET_SUPPORT -I/usr/share/qt3/mkspecs/default -I. -I. -IAVSDK -I/usr/include/qt3 -o AVC.o AVSDK/AVC.cpp
g++ -c -pipe -g -Wall -W -O2 -D_REENTRANT  -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED -DQT_TABLET_SUPPORT -I/usr/share/qt3/mkspecs/default -I. -I. -IAVSDK -I/usr/include/qt3 -o AVLoadSo.o AVSDK/AVLoadSo.cpp
g++  -o VPCnew main.o AVC.o AVLoadSo.o    -L/usr/X11R6/lib -L/usr/lib -lqt-mt -lavcodec -lSDL  -lXext -lX11 -lm -lpthread
main.o: In function `main':
/home/nauro/work/AllViewProject/Season_2/VPCnew/main.cpp:398: undefined reference to `avcodec_register_all()'
/home/nauro/work/AllViewProject/Season_2/VPCnew/main.cpp:414: undefined reference to `avcodec_find_decoder(CodecID)'
/home/nauro/work/AllViewProject/Season_2/VPCnew/main.cpp:421: undefined reference to `avcodec_alloc_context()'
/home/nauro/work/AllViewProject/Season_2/VPCnew/main.cpp:422: undefined reference to `avcodec_alloc_context()'
/home/nauro/work/AllViewProject/Season_2/VPCnew/main.cpp:433: undefined reference to `avcodec_open(AVCodecContext*, AVCodec*)'
/home/nauro/work/AllViewProject/Season_2/VPCnew/main.cpp:435: undefined reference to `avcodec_open(AVCodecContext*, AVCodec*)'
/home/nauro/work/AllViewProject/Season_2/VPCnew/main.cpp:438: undefined reference to `avcodec_alloc_frame()'
/home/nauro/work/AllViewProject/Season_2/VPCnew/main.cpp:439: undefined reference to `avcodec_alloc_frame()'
/home/nauro/work/AllViewProject/Season_2/VPCnew/main.cpp:440: undefined reference to `avcodec_alloc_frame()'
/home/nauro/work/AllViewProject/Season_2/VPCnew/main.cpp:441: undefined reference to `avcodec_alloc_frame()'
/home/nauro/work/AllViewProject/Season_2/VPCnew/main.cpp:662: undefined reference to `av_free(void*)'
/home/nauro/work/AllViewProject/Season_2/VPCnew/main.cpp:665: undefined reference to `avcodec_close(AVCodecContext*)'
/home/nauro/work/AllViewProject/Season_2/VPCnew/main.cpp:666: undefined reference to `avcodec_close(AVCodecContext*)'
/home/nauro/work/AllViewProject/Season_2/VPCnew/main.cpp:609: undefined reference to `avcodec_open(AVCodecContext*, AVCodec*)'
/home/nauro/work/AllViewProject/Season_2/VPCnew/main.cpp:610: undefined reference to `avcodec_open(AVCodecContext*, AVCodec*)'
collect2: ld returned 1 exit status
make: *** [VPCnew] Ошибка 1
nauro at nauro:~/work/AllViewProject/Season_2/VPCnew$ 

Well, I don't understand what's wrong with it, because libavcodec and libavcodec-dev are installed, in main.cpp I've got #include <libavcodec/avcodec.h> And all this function are in avcodec.h...

Thanks for your help.

Best regards,
Nauro.
nauro at nauro:~/work/AllViewProject/Season_2/VPCnew$ make
g++ -c -pipe -g -Wall -W -O2 -D_REENTRANT  -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED -DQT_TABLET_SUPPORT -I/usr/share/qt3/mkspecs/default -I. -I. -IAVSDK -I/usr/include/qt3 -o main.o main.cpp
g++ -c -pipe -g -Wall -W -O2 -D_REENTRANT  -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED -DQT_TABLET_SUPPORT -I/usr/share/qt3/mkspecs/default -I. -I. -IAVSDK -I/usr/include/qt3 -o AVC.o AVSDK/AVC.cpp
g++ -c -pipe -g -Wall -W -O2 -D_REENTRANT  -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED -DQT_TABLET_SUPPORT -I/usr/share/qt3/mkspecs/default -I. -I. -IAVSDK -I/usr/include/qt3 -o AVLoadSo.o AVSDK/AVLoadSo.cpp
g++  -o VPCnew main.o AVC.o AVLoadSo.o    -L/usr/X11R6/lib -L/usr/lib -lqt-mt -lavcodec -lSDL  -lXext -lX11 -lm -lpthread
main.o: In function `main':
/home/nauro/work/AllViewProject/Season_2/VPCnew/main.cpp:398: undefined reference to `avcodec_register_all()'
/home/nauro/work/AllViewProject/Season_2/VPCnew/main.cpp:414: undefined reference to `avcodec_find_decoder(CodecID)'
/home/nauro/work/AllViewProject/Season_2/VPCnew/main.cpp:421: undefined reference to `avcodec_alloc_context()'
/home/nauro/work/AllViewProject/Season_2/VPCnew/main.cpp:422: undefined reference to `avcodec_alloc_context()'
/home/nauro/work/AllViewProject/Season_2/VPCnew/main.cpp:433: undefined reference to `avcodec_open(AVCodecContext*, AVCodec*)'
/home/nauro/work/AllViewProject/Season_2/VPCnew/main.cpp:435: undefined reference to `avcodec_open(AVCodecContext*, AVCodec*)'
/home/nauro/work/AllViewProject/Season_2/VPCnew/main.cpp:438: undefined reference to `avcodec_alloc_frame()'
/home/nauro/work/AllViewProject/Season_2/VPCnew/main.cpp:439: undefined reference to `avcodec_alloc_frame()'
/home/nauro/work/AllViewProject/Season_2/VPCnew/main.cpp:440: undefined reference to `avcodec_alloc_frame()'
/home/nauro/work/AllViewProject/Season_2/VPCnew/main.cpp:441: undefined reference to `avcodec_alloc_frame()'
/home/nauro/work/AllViewProject/Season_2/VPCnew/main.cpp:662: undefined reference to `av_free(void*)'
/home/nauro/work/AllViewProject/Season_2/VPCnew/main.cpp:665: undefined reference to `avcodec_close(AVCodecContext*)'
/home/nauro/work/AllViewProject/Season_2/VPCnew/main.cpp:666: undefined reference to `avcodec_close(AVCodecContext*)'
/home/nauro/work/AllViewProject/Season_2/VPCnew/main.cpp:609: undefined reference to `avcodec_open(AVCodecContext*, AVCodec*)'
/home/nauro/work/AllViewProject/Season_2/VPCnew/main.cpp:610: undefined reference to `avcodec_open(AVCodecContext*, AVCodec*)'
collect2: ld returned 1 exit status
make: *** [VPCnew] Ошибка 1
nauro at nauro:~/work/AllViewProject/Season_2/VPCnew$ 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20110505/56a41109/attachment.html>


More information about the Libav-user mailing list