0

我正在尝试编译文件。我已经构建了 libvpx 并使用 configure --target=x86_64-linux-gcc 进行制作。首先,我从示例文件夹中复制了 c 文件。然后开始编辑。首先解决了所有包含问题。主要与 vpx_config.h 有关。一切都解决了,仍然显示 vpx_codec_control 未定义。

有什么我做错了吗?使用与此问题相关的 libvpx 编译项目时未定义的引用有解决方案, 但对我没有帮助。

/tmp/ccufKmQE.o: In function `vpx_codec_control_VP8_SET_REFERENCE':
vp8_multi_resolution_encoder.c:(.text+0x106): undefined reference to `vpx_codec_control_'
/tmp/ccufKmQE.o: In function `vpx_codec_control_VP8_COPY_REFERENCE':
vp8_multi_resolution_encoder.c:(.text+0x135): undefined reference to `vpx_codec_control_'
/tmp/ccufKmQE.o: In function `vpx_codec_control_VP8_SET_POSTPROC':
vp8_multi_resolution_encoder.c:(.text+0x164): undefined reference to `vpx_codec_control_'
/tmp/ccufKmQE.o: In function `vpx_codec_control_VP9_GET_REFERENCE':
vp8_multi_resolution_encoder.c:(.text+0x193): undefined reference to `vpx_codec_control_'
/tmp/ccufKmQE.o: In function `vpx_codec_control_VP8E_SET_FRAME_FLAGS':
vp8_multi_resolution_encoder.c:(.text+0x1c0): undefined reference to `vpx_codec_control_'
/tmp/ccufKmQE.o:vp8_multi_resolution_encoder.c:(.text+0x1ed): more undefined references to `vpx_codec_control_' follow
/tmp/ccufKmQE.o: In function `main':
vp8_multi_resolution_encoder.c:(.text+0x1723): undefined reference to `die'
vp8_multi_resolution_encoder.c:(.text+0x1728): undefined reference to `vpx_codec_vp8_cx'
vp8_multi_resolution_encoder.c:(.text+0x1730): undefined reference to `vpx_codec_iface_name'
vp8_multi_resolution_encoder.c:(.text+0x1801): undefined reference to `die'
vp8_multi_resolution_encoder.c:(.text+0x1851): undefined reference to `die'
vp8_multi_resolution_encoder.c:(.text+0x1919): undefined reference to `die'
vp8_multi_resolution_encoder.c:(.text+0x1a20): undefined reference to `die'
vp8_multi_resolution_encoder.c:(.text+0x1b2b): undefined reference to `vpx_codec_vp8_cx'
vp8_multi_resolution_encoder.c:(.text+0x1b3b): undefined reference to `vpx_codec_enc_config_default'
vp8_multi_resolution_encoder.c:(.text+0x1b75): undefined reference to `vpx_codec_err_to_string'
vp8_multi_resolution_encoder.c:(.text+0x1ff6): undefined reference to `vpx_img_alloc'
vp8_multi_resolution_encoder.c:(.text+0x205c): undefined reference to `die'
vp8_multi_resolution_encoder.c:(.text+0x21cb): undefined reference to `vpx_codec_vp8_cx'
vp8_multi_resolution_encoder.c:(.text+0x21fc): undefined reference to `vpx_codec_enc_init_multi_ver'
vp8_multi_resolution_encoder.c:(.text+0x221a): undefined reference to `die_codec'
vp8_multi_resolution_encoder.c:(.text+0x22b0): undefined reference to `die_codec'
vp8_multi_resolution_encoder.c:(.text+0x2337): undefined reference to `die_codec'
vp8_multi_resolution_encoder.c:(.text+0x237a): undefined reference to `die_codec'
vp8_multi_resolution_encoder.c:(.text+0x23b5): undefined reference to `die_codec'
/tmp/ccufKmQE.o:vp8_multi_resolution_encoder.c:(.text+0x2428): more undefined references to `die_codec' follow
/tmp/ccufKmQE.o: In function `main':
vp8_multi_resolution_encoder.c:(.text+0x28f2): undefined reference to `I420Scale'
vp8_multi_resolution_encoder.c:(.text+0x2bae): undefined reference to `vpx_codec_encode'
vp8_multi_resolution_encoder.c:(.text+0x2bc8): undefined reference to `die_codec'
vp8_multi_resolution_encoder.c:(.text+0x2e20): undefined reference to `vpx_codec_get_cx_data'
vp8_multi_resolution_encoder.c:(.text+0x2fd7): undefined reference to `sse_to_psnr'
vp8_multi_resolution_encoder.c:(.text+0x30d1): undefined reference to `vpx_codec_destroy'
vp8_multi_resolution_encoder.c:(.text+0x3105): undefined reference to `die_codec'
vp8_multi_resolution_encoder.c:(.text+0x312e): undefined reference to `vpx_img_free'
collect2: error: ld returned 1 exit status

如果我尝试用 g++ 而不是 gcc 编译

g++ vp8_multi_resolution_encoder.c 
vp8_multi_resolution_encoder.c: In function ‘int main(int, char**)’:
vp8_multi_resolution_encoder.c:438:9: error: ‘I420Scale’ was not declared in this scope
         I420Scale(
         ^~~~~~~~~
vp8_multi_resolution_encoder.c:438:9: note: suggested alternative:
In file included from vp8_multi_resolution_encoder.c:31:0:
third_party/libyuv/include/libyuv/scale.h:63:5: note:   ‘libyuv::I420Scale’
 int I420Scale(const uint8_t* src_y,
4

0 回答 0