[MPlayer-dev-eng] The problem that I made mencoder source to static library.

Chang Min Jeon jcm1981 at gmail.com
Sat Jul 9 17:51:15 CEST 2005


FIRST. I downloaded mplayer source from CVS(2005.6.20)
 SECOND .I changed Makefile something like this.
 libenc.a : $(MENCODER_DEP)
ar rc $@ $(OBJS_MENCODER) $(LIBS_MENCODER)
 THIRD I changed mencoder.c following line.
 // before
int main(int argc, char* argv[])
 // after
int startEncoding(int argc, char* argv[])
 FOURTH. I entered "make" command line.
 ...........
........
.....
...
..
 ar rc libenc.a mencoder.o mp_msg-mencoder.o asxparser.o codec-cfg.o 
cpudetect.o edl.o find_sub.o m_config.o m_option.o m_struct.o parser-cfg.o 
playtree.o playtreeparser.o spudec.o sub_cc.o subreader.o vobsub.o 
unrarlib.o divx4_vbr.o libvo/aclib.o libvo/font_load.o libvo/font_load_ft.o 
libvo/osd.o libvo/sub.o parser-mecmd.o xvid_vbr.o 
libmpcodecs/libmpencoders.a -ldivxencore -lmp3lame libmpcodecs/libmpcodecs.a 
loader/libloader.a loader/dshow/libDS_Filter.a loader/dmo/libDMO_Filter.a 
libaf/libaf.a libmpdemux/libmpdemux.a input/libinput.a postproc/libswscale.a 
osdep/libosdep.a -Llibmpdvdkit2 -lmpdvdkit libavcodec/libavcodec.a -lmad 
-ldv -ldivxdecore -lmp3lame -lxvidcore -lm -lpng -lz -lz -ljpeg -lasound 
-ldl -lpthread -lx264 -lm -lpthread -lfreetype -lz -ltermcap 
-lcdda_interface -lcdda_paranoia -lnsl -lungif -lsmbclient -lfontconfig 
libfaad2/libfaad2.a mp3lib/libMP3.a liba52/liba52.a libmpeg2/libmpeg2.a 
tremor/libvorbisidec.a -Wl,-z,noexecstack -lpthread -ldl -rdynamic -lm
ar: '-ldivxencore': No such file
ar: '-lmp3lame': No such file
ar: '-Llibmpdvdkit2': No such file
ar: '-lmpdvdkit': No such file
ar: '-lmad': No such file
ar: '-ldv': No such file
ar: '-ldivxdecore': No such file
ar: '-lmp3lame': No such file
ar: '-lxvidcore': No such file
ar: '-lm': No such file
ar: '-lpng': No such file
ar: '-lz': No such file
ar: '-lz': No such file
ar: '-ljpeg': No such file
ar: '-lasound': No such file
ar: '-ldl': No such file
ar: '-lpthread': No such file
ar: '-lx264': No such file
ar: '-lm': No such file
ar: '-lpthread': No such file
ar: '-lfreetype': No such file
ar: '-lz': No such file
ar: '-ltermcap': No such file
ar: '-lcdda_interface': No such file
ar: '-lcdda_paranoia': No such file
ar: '-lnsl': No such file
ar: '-lungif': No such file
ar: '-lsmbclient': No such file
ar: '-lfontconfig': No such file
ar: '-Wl,-z,noexecstack': No such file
ar: '-lpthread': No such file
ar: '-ldl': No such file
ar: '-rdynamic': No such file
ar: '-lm': No such file
 [root at viola MPlayer-20050622]# ls -al libenc.a
-rw-r--r-- 1 root 1001 6694314 7월 10 00:19 libenc.a
 FIFTH
 I created sample source and makefile by myself.
 file: main.cpp
extern int startEncoding(int argc,char* argv[]);
 int main(int argc, char* argv[])
{
startEncoding(argc, argv);
return 0;
}
 [root at viola encoding]# make
cc -lstdc++ -o test main.o -L. -lenc
main.o(.text+0x26): In function `main':
: undefined reference to `startEncoding(int, char**)'
collect2: ld returned 1 exit status
make: *** [test] error 1
[root at viola encoding]# 
 Jeon, Chang-Min
 Thanks in advance


More information about the MPlayer-dev-eng mailing list