我從網上下載了smpeg-0.4.4.tar.gz,通過它安裝了smpeg庫。其相關目錄如下:
/usr/local/lib # ls
directfb-1.0-0 libdirect.la libiconv.la libSDL.la libSDL_mixer.so libsmpeg.so
libcharset.a libfreetype.a libSDL-1.2.so.0 libSDLmain.a libSDL.so libsmpeg.so.0
libcharset.la libfreetype.la libSDL-1.2.so.0.11.2 libSDL_mixer-1.2.so.0 libsmpeg-0.4.so.0 pkgconfig
libdirect.a libfusion.a libSDL.a libSDL_mixer-1.2.so.0.2.6 libsmpeg-0.4.so.0.1.3 preloadable_libiconv.so
libdirectfb.a libfusion.la libSDL_image.a libSDL_mixer.a libsmpeg.a
libdirectfb.la libiconv.a libSDL_image.la libSDL_mixer.la libsmpeg.la
/usr/local/bin # ls
directfb-config freetype-config glmovie iconv plaympeg sdl-config smpeg-config
然後我又下載了SDL_mixer-1.2.8.tar.tar,想通過它安裝sdl_mixer庫。結果./configure時提示我以下信息:
#./configure --prefix=/usr/local --enable-static=yes --with-smpeg-prefix=/usr/local --with-smpeg-exec-prefix=/usr/local
checking for smpeg-config... /usr/local/bin/smpeg-config
checking for SMPEG - version >= 0.4.3... no
*** Could not run SMPEG test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means SMPEG was incorrectly installed
*** or that you have moved SMPEG since it was installed. In the latter case, you
*** may want to edit the smpeg-config script: /usr/local/bin/smpeg-config
打開config.log,發現:
configure:20257: checking for smpeg-config
configure:20288: result: /usr/local/bin/smpeg-config
configure:20296: checking for SMPEG - version >= 0.4.3
configure:20386: gcc -o conftest -D_GNU_SOURCE=1 -I/usr/local/include -I/usr/local/include/smpeg -I/usr/local/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/local/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -D_GNU_SOURCE=1 conftest.c -L/usr/local/lib -lsmpeg -L/usr/local/lib -Wl,-rpath,/usr/local/lib -lSDL -lpthread -L/usr/local/lib -Wl,-rpath,/usr/local/lib -lSDL -lpthread >&5
/usr/local/lib/libsmpeg.so: undefined reference to `operator new[](unsigned int)'
/usr/local/lib/libsmpeg.so: undefined reference to `operator delete(void*)'
/usr/local/lib/libsmpeg.so: undefined reference to `__cxa_pure_virtual'
/usr/local/lib/libsmpeg.so: undefined reference to `operator delete[](void*)'
/usr/local/lib/libsmpeg.so: undefined reference to `operator new(unsigned int)'
collect2: ld returned 1 exit status
configure:20389: $? = 1
configure: program exited with status 1
為什麼sdl_mixer用不上smpeg的庫文件呀???呼喚大牛!!!