I can compile baresip with modification in contrib file like below:
EXTRA_MODULES='g711 audiounit avformat avcapture opengles avcodec'
Terminal results:
LD libre.dylib
AR libre.a
LD libre.dylib
AR libre.a
LD libre.dylib
AR libre.a
LD libre.dylib
AR libre.a
LD librem.dylib
AR librem.a
LD librem.dylib
AR librem.a
LD librem.dylib
AR librem.a
LD librem.dylib
AR librem.a
CC /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/src/audio.o
CC /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/src/aulevel.o
CC /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/src/conf.o
CC /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/src/config.o
CC /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/src/h264.o
CC /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/src/play.o
CC /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/src/video.o
CC /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/src/vidutil.o
SH src/static.c
CC /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/src/static.o
CC [m] /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/modules/g711/g711.o
CC [m] /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/modules/audiounit/audiounit.o
CC [m] /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/modules/audiounit/sess.o
CC [m] /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/modules/audiounit/player.o
CC [m] /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/modules/audiounit/recorder.o
CC [m] /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/modules/avformat/avformat.o
OC [m] /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/modules/avcapture/avcapture.o
CC [m] /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/modules/opengles/opengles.o
CC [m] /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/modules/avcodec/avcodec.o
CC [m] /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/modules/avcodec/decode.o
CC [m] /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/modules/avcodec/encode.o
CC [m] /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/modules/avcodec/h263.o
CC [m] /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/modules/auloop/auloop.o
CC [m] /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/modules/fakevideo/fakevideo.o
CC [m] /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/modules/selfview/selfview.o
CC [m] /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/modules/vidbridge/vidbridge.o
CC [m] /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/modules/vidbridge/src.o
CC [m] /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/modules/vidbridge/disp.o
CC [m] /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/modules/vidinfo/draw.o
CC [m] /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/modules/vidinfo/vidinfo.o
CC [m] /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/modules/vidloop/vidloop.o
CC [m] /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/modules/vumeter/vumeter.o
CC [m] /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/modules/aubridge/device.o
CC [m] /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/modules/aubridge/src.o
CC [m] /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/modules/aubridge/play.o
CC [m] /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/modules/aufile/aufile.o
AR libbaresip.a
But now when I use these file Contrib > aarch64 to my project it gives error while build like :
Undefined symbols for architecture arm64:
"_av_opt_set_defaults", referenced from:
_avcodec_encode in libbaresip.a(encode.o)
"_av_opt_set_int", referenced from:
_avcodec_encode in libbaresip.a(encode.o)
"_av_hwframe_ctx_alloc", referenced from:
_avcodec_encode in libbaresip.a(encode.o)
"_av_hwframe_ctx_init", referenced from:
_avcodec_encode in libbaresip.a(encode.o)
"_av_hwframe_get_buffer", referenced from:
_avcodec_encode in libbaresip.a(encode.o)
"_av_opt_set", referenced from:
_avcodec_encode in libbaresip.a(encode.o)
"_av_frame_copy_props", referenced from:
_avcodec_encode in libbaresip.a(encode.o)
"_av_packet_alloc", referenced from:
_avcodec_encode in libbaresip.a(encode.o)
"_avcodec_receive_packet", referenced from:
_avcodec_encode in libbaresip.a(encode.o)
"_av_packet_free", referenced from:
_avcodec_encode in libbaresip.a(encode.o)
"_avcodec_free_context", referenced from:
_destructor in libbaresip.a(decode.o)
_destructor in libbaresip.a(encode.o)
_avcodec_encode in libbaresip.a(encode.o)
"_avcodec_send_packet", referenced from:
_read_thread in libbaresip.a(avformat.o)
_ffdecode in libbaresip.a(decode.o)
"_av_seek_frame", referenced from:
_read_thread in libbaresip.a(avformat.o)
"_avformat_open_input", referenced from:
_alloc in libbaresip.a(avformat.o)
"_avformat_find_stream_info", referenced from:
_alloc in libbaresip.a(avformat.o)
"_av_free", referenced from:
_destructor in libbaresip.a(decode.o)
_avcodec_encode in libbaresip.a(encode.o)
"_avformat_network_init", referenced from:
_module_init in libbaresip.a(avformat.o)
"_avcodec_parameters_to_context", referenced from:
_alloc in libbaresip.a(avformat.o)
"_avcodec_open2", referenced from:
_alloc in libbaresip.a(avformat.o)
_avcodec_decode_update in libbaresip.a(decode.o)
_avcodec_encode in libbaresip.a(encode.o)
"_avcodec_send_frame", referenced from:
_avcodec_encode in libbaresip.a(encode.o)
"_av_hwframe_transfer_data", referenced from:
_ffdecode in libbaresip.a(decode.o)
_avcodec_encode in libbaresip.a(encode.o)
"_av_frame_alloc", referenced from:
_read_thread in libbaresip.a(avformat.o)
_avcodec_decode_update in libbaresip.a(decode.o)
_ffdecode in libbaresip.a(decode.o)
_avcodec_encode in libbaresip.a(encode.o)
"_avcodec_close", referenced from:
_destructor in libbaresip.a(avformat.o)
"_av_read_frame", referenced from:
_read_thread in libbaresip.a(avformat.o)
"_avcodec_alloc_context3", referenced from:
_alloc in libbaresip.a(avformat.o)
_avcodec_decode_update in libbaresip.a(decode.o)
_avcodec_encode in libbaresip.a(encode.o)
"_avformat_network_deinit", referenced from:
_module_close in libbaresip.a(avformat.o)
"_avcodec_find_encoder", referenced from:
_avcodec_encode_update in libbaresip.a(encode.o)
"_avcodec_find_encoder_by_name", referenced from:
_module_init in libbaresip.a(avcodec.o)
_avcodec_encode in libbaresip.a(encode.o)
"_avcodec_find_decoder_by_name", referenced from:
_module_init in libbaresip.a(avcodec.o)
"_avcodec_find_decoder", referenced from:
_module_init in libbaresip.a(avcodec.o)
_alloc in libbaresip.a(avformat.o)
_avcodec_decode_update in libbaresip.a(decode.o)
"_av_frame_free", referenced from:
_read_thread in libbaresip.a(avformat.o)
_ffdecode in libbaresip.a(decode.o)
_avcodec_encode in libbaresip.a(encode.o)
"_av_get_pix_fmt_name", referenced from:
_module_init in libbaresip.a(avcodec.o)
_read_thread in libbaresip.a(avformat.o)
_ffdecode in libbaresip.a(decode.o)
"_av_buffer_unref", referenced from:
_module_close in libbaresip.a(avcodec.o)
_avcodec_encode in libbaresip.a(encode.o)
"_av_hwdevice_find_type_by_name", referenced from:
_module_init in libbaresip.a(avcodec.o)
"_avcodec_receive_frame", referenced from:
_read_thread in libbaresip.a(avformat.o)
_ffdecode in libbaresip.a(decode.o)
"_avdevice_register_all", referenced from:
_module_init in libbaresip.a(avformat.o)
"_avformat_close_input", referenced from:
_destructor in libbaresip.a(avformat.o)
"_av_buffer_ref", referenced from:
_avcodec_decode_update in libbaresip.a(decode.o)
_avcodec_encode in libbaresip.a(encode.o)
"_av_strerror", referenced from:
_module_init in libbaresip.a(avcodec.o)
_ffdecode in libbaresip.a(decode.o)
_avcodec_encode in libbaresip.a(encode.o)
"_av_hwdevice_get_type_name", referenced from:
_module_init in libbaresip.a(avcodec.o)
_avcodec_decode_update in libbaresip.a(decode.o)
"_avcodec_get_hw_config", referenced from:
_module_init in libbaresip.a(avcodec.o)
"_av_packet_unref", referenced from:
_read_thread in libbaresip.a(avformat.o)
"_av_init_packet", referenced from:
_read_thread in libbaresip.a(avformat.o)
_ffdecode in libbaresip.a(decode.o)
"_av_hwdevice_ctx_create", referenced from:
_module_init in libbaresip.a(avcodec.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I can compile baresip with modification in contrib file like below: EXTRA_MODULES='g711 audiounit avformat avcapture opengles avcodec'
Terminal results: LD libre.dylib AR libre.a LD libre.dylib AR libre.a LD libre.dylib AR libre.a LD libre.dylib AR libre.a LD librem.dylib AR librem.a LD librem.dylib AR librem.a LD librem.dylib AR librem.a LD librem.dylib AR librem.a CC /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/src/audio.o CC /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/src/aulevel.o CC /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/src/conf.o CC /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/src/config.o CC /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/src/h264.o CC /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/src/play.o CC /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/src/video.o CC /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/src/vidutil.o SH src/static.c CC /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/src/static.o CC [m] /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/modules/g711/g711.o CC [m] /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/modules/audiounit/audiounit.o CC [m] /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/modules/audiounit/sess.o CC [m] /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/modules/audiounit/player.o CC [m] /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/modules/audiounit/recorder.o CC [m] /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/modules/avformat/avformat.o OC [m] /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/modules/avcapture/avcapture.o CC [m] /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/modules/opengles/opengles.o CC [m] /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/modules/avcodec/avcodec.o CC [m] /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/modules/avcodec/decode.o CC [m] /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/modules/avcodec/encode.o CC [m] /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/modules/avcodec/h263.o CC [m] /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/modules/auloop/auloop.o CC [m] /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/modules/fakevideo/fakevideo.o CC [m] /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/modules/selfview/selfview.o CC [m] /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/modules/vidbridge/vidbridge.o CC [m] /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/modules/vidbridge/src.o CC [m] /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/modules/vidbridge/disp.o CC [m] /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/modules/vidinfo/draw.o CC [m] /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/modules/vidinfo/vidinfo.o CC [m] /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/modules/vidloop/vidloop.o CC [m] /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/modules/vumeter/vumeter.o CC [m] /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/modules/aubridge/device.o CC [m] /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/modules/aubridge/src.o CC [m] /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/modules/aubridge/play.o CC [m] /Users/xxx/Desktop/baresip-ios-master/build/aarch64/baresip/modules/aufile/aufile.o AR libbaresip.a
But now when I use these file Contrib > aarch64 to my project it gives error while build like :
Undefined symbols for architecture arm64: "_av_opt_set_defaults", referenced from: _avcodec_encode in libbaresip.a(encode.o) "_av_opt_set_int", referenced from: _avcodec_encode in libbaresip.a(encode.o) "_av_hwframe_ctx_alloc", referenced from: _avcodec_encode in libbaresip.a(encode.o) "_av_hwframe_ctx_init", referenced from: _avcodec_encode in libbaresip.a(encode.o) "_av_hwframe_get_buffer", referenced from: _avcodec_encode in libbaresip.a(encode.o) "_av_opt_set", referenced from: _avcodec_encode in libbaresip.a(encode.o) "_av_frame_copy_props", referenced from: _avcodec_encode in libbaresip.a(encode.o) "_av_packet_alloc", referenced from: _avcodec_encode in libbaresip.a(encode.o) "_avcodec_receive_packet", referenced from: _avcodec_encode in libbaresip.a(encode.o) "_av_packet_free", referenced from: _avcodec_encode in libbaresip.a(encode.o) "_avcodec_free_context", referenced from: _destructor in libbaresip.a(decode.o) _destructor in libbaresip.a(encode.o) _avcodec_encode in libbaresip.a(encode.o) "_avcodec_send_packet", referenced from: _read_thread in libbaresip.a(avformat.o) _ffdecode in libbaresip.a(decode.o) "_av_seek_frame", referenced from: _read_thread in libbaresip.a(avformat.o) "_avformat_open_input", referenced from: _alloc in libbaresip.a(avformat.o) "_avformat_find_stream_info", referenced from: _alloc in libbaresip.a(avformat.o) "_av_free", referenced from: _destructor in libbaresip.a(decode.o) _avcodec_encode in libbaresip.a(encode.o) "_avformat_network_init", referenced from: _module_init in libbaresip.a(avformat.o) "_avcodec_parameters_to_context", referenced from: _alloc in libbaresip.a(avformat.o) "_avcodec_open2", referenced from: _alloc in libbaresip.a(avformat.o) _avcodec_decode_update in libbaresip.a(decode.o) _avcodec_encode in libbaresip.a(encode.o) "_avcodec_send_frame", referenced from: _avcodec_encode in libbaresip.a(encode.o) "_av_hwframe_transfer_data", referenced from: _ffdecode in libbaresip.a(decode.o) _avcodec_encode in libbaresip.a(encode.o) "_av_frame_alloc", referenced from: _read_thread in libbaresip.a(avformat.o) _avcodec_decode_update in libbaresip.a(decode.o) _ffdecode in libbaresip.a(decode.o) _avcodec_encode in libbaresip.a(encode.o) "_avcodec_close", referenced from: _destructor in libbaresip.a(avformat.o) "_av_read_frame", referenced from: _read_thread in libbaresip.a(avformat.o) "_avcodec_alloc_context3", referenced from: _alloc in libbaresip.a(avformat.o) _avcodec_decode_update in libbaresip.a(decode.o) _avcodec_encode in libbaresip.a(encode.o) "_avformat_network_deinit", referenced from: _module_close in libbaresip.a(avformat.o) "_avcodec_find_encoder", referenced from: _avcodec_encode_update in libbaresip.a(encode.o) "_avcodec_find_encoder_by_name", referenced from: _module_init in libbaresip.a(avcodec.o) _avcodec_encode in libbaresip.a(encode.o) "_avcodec_find_decoder_by_name", referenced from: _module_init in libbaresip.a(avcodec.o) "_avcodec_find_decoder", referenced from: _module_init in libbaresip.a(avcodec.o) _alloc in libbaresip.a(avformat.o) _avcodec_decode_update in libbaresip.a(decode.o) "_av_frame_free", referenced from: _read_thread in libbaresip.a(avformat.o) _ffdecode in libbaresip.a(decode.o) _avcodec_encode in libbaresip.a(encode.o) "_av_get_pix_fmt_name", referenced from: _module_init in libbaresip.a(avcodec.o) _read_thread in libbaresip.a(avformat.o) _ffdecode in libbaresip.a(decode.o) "_av_buffer_unref", referenced from: _module_close in libbaresip.a(avcodec.o) _avcodec_encode in libbaresip.a(encode.o) "_av_hwdevice_find_type_by_name", referenced from: _module_init in libbaresip.a(avcodec.o) "_avcodec_receive_frame", referenced from: _read_thread in libbaresip.a(avformat.o) _ffdecode in libbaresip.a(decode.o) "_avdevice_register_all", referenced from: _module_init in libbaresip.a(avformat.o) "_avformat_close_input", referenced from: _destructor in libbaresip.a(avformat.o) "_av_buffer_ref", referenced from: _avcodec_decode_update in libbaresip.a(decode.o) _avcodec_encode in libbaresip.a(encode.o) "_av_strerror", referenced from: _module_init in libbaresip.a(avcodec.o) _ffdecode in libbaresip.a(decode.o) _avcodec_encode in libbaresip.a(encode.o) "_av_hwdevice_get_type_name", referenced from: _module_init in libbaresip.a(avcodec.o) _avcodec_decode_update in libbaresip.a(decode.o) "_avcodec_get_hw_config", referenced from: _module_init in libbaresip.a(avcodec.o) "_av_packet_unref", referenced from: _read_thread in libbaresip.a(avformat.o) "_av_init_packet", referenced from: _read_thread in libbaresip.a(avformat.o) _ffdecode in libbaresip.a(decode.o) "_av_hwdevice_ctx_create", referenced from: _module_init in libbaresip.a(avcodec.o) ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
Don't know why? Thanks in advance