2013-06-02 5 views
2

내가 구글의 libvpx 인코더 예제를 컴파일하려고 컴파일하는 여기에서 찾을 수 있습니다 : 난는 libvpx : 간단한 인코더 예를

/usr/local/lib/libvpx.a(rdopt.c.o): In function `vp8_initialize_rd_consts': 
(.text+0x3519): undefined reference to `pow' 
/usr/local/lib/libvpx.a(onyx_if.c.o): In function `vp8_create_compressor': 
(.text+0x34a8): undefined reference to `log' 
/usr/local/lib/libvpx.a(psnr.c.o): In function `vp8_mse2psnr': 
(.text+0x1f): undefined reference to `log10' 
/usr/local/lib/libvpx.a(postproc.c.o):(.text+0xa4): undefined reference to `exp' 
/usr/local/lib/libvpx.a(postproc.c.o): In function `vp8_gaussian': 
(.text+0x11d2): undefined reference to `exp' 
/usr/local/lib/libvpx.a(firstpass.c.o):(.text+0x539): undefined reference to `pow' 
/usr/local/lib/libvpx.a(firstpass.c.o):(.text+0x5b6): undefined reference to `pow' 
/usr/local/lib/libvpx.a(firstpass.c.o):(.text+0x8cb): undefined reference to `pow' 
/usr/local/lib/libvpx.a(firstpass.c.o):(.text+0xb52): undefined reference to `sqrt' 
/usr/local/lib/libvpx.a(firstpass.c.o):(.text+0xca3): undefined reference to `pow' 
/usr/local/lib/libvpx.a(firstpass.c.o): In function `vp8_init_second_pass': 
(.text+0x22b2): undefined reference to `pow' 
/usr/local/lib/libvpx.a(firstpass.c.o): In function `vp8_init_second_pass': 
(.text+0x2376): undefined reference to `pow' 
/usr/local/lib/libvpx.a(firstpass.c.o): In function `vp8_second_pass': 
(.text+0x26c6): undefined reference to `log' 
/usr/local/lib/libvpx.a(firstpass.c.o): In function `vp8_second_pass': 
(.text+0x26df): undefined reference to `log' 
/usr/local/lib/libvpx.a(firstpass.c.o): In function `vp8_second_pass': 
(.text+0x26f6): undefined reference to `log' 
/usr/local/lib/libvpx.a(firstpass.c.o): In function `vp8_second_pass': 
(.text+0x2f39): undefined reference to `pow' 
/usr/local/lib/libvpx.a(firstpass.c.o): In function `vp8_second_pass': 
(.text+0x300e): undefined reference to `pow' 
/usr/local/lib/libvpx.a(firstpass.c.o): In function `vp8_second_pass': 
(.text+0x3790): undefined reference to `pow' 
/usr/local/lib/libvpx.a(firstpass.c.o): In function `vp8_second_pass': 
(.text+0x387d): undefined reference to `pow' 
/usr/local/lib/libvpx.a(firstpass.c.o): In function `vp8_second_pass': 
(.text+0x3c6d): undefined reference to `pow' 
/usr/local/lib/libvpx.a(firstpass.c.o):(.text+0x486f): more undefined references to `pow' follow 
/usr/local/lib/libvpx.a(firstpass.c.o): In function `vp8_second_pass': 
(.text+0x7208): undefined reference to `sqrt' 
/usr/local/lib/libvpx.a(firstpass.c.o): In function `vp8_second_pass': 
(.text+0x7264): undefined reference to `sqrt' 
/usr/local/lib/libvpx.a(firstpass.c.o): In function `vp8_second_pass': 
(.text+0x72b8): undefined reference to `sqrt' 
/usr/local/lib/libvpx.a(firstpass.c.o): In function `vp8_second_pass': 
(.text+0x7330): undefined reference to `sqrt' 
/usr/local/lib/libvpx.a(firstpass.c.o): In function `vp8_second_pass': 
(.text+0x73c1): undefined reference to `sqrt' 

:

http://www.webmproject.org/docs/vp8-sdk/example__simple__encoder.html

불행하게도 libvpx 종속성을 놓칠 것 같다 Fedora 18 x64를 사용하고 소스 (make + make install)에서 libvpx를 빌드 했으므로 모든 것이 제자리에 있어야합니다. 이 문제를 겪은 사람이 있습니까?

답변

0

수학 라이브러리를 연결하는 데 누락되었습니다. -lm

1

libvpx를 정적으로 연결하고 있습니까? 동적으로 링크하려면 -lvpx를 사용하면됩니다. 나는이 문제 (우분투 12.10, x64, 소스에서 빌드 된 vpx, gcc 4.7.2)에 부딪치지 않았다.

필자는 pow, exp, sqrt 등은 libm에 포함되어 있습니다. 컴파일러와 함께 제공되는 maths 라이브러리이므로 링커 플래그에 -lm을 추가하면 오류가 사라집니다.