1
我在Mac OSX上使用FFMPEG,我的Mac版本是10.6.8(i386)。鏈接動態庫和ffmpeg x86_64版本
當我嘗試編譯我的C++代碼鏈接動態庫:
g++ sdk.cpp -rpath /usr/local/lib/libinsight.dylib -o sdk
我得到以下錯誤:
Undefined symbols for architecture x86_64:
"_main", referenced from:
start in crt1.10.6.o
"av_open_input_file(AVFormatContext**, char const*, AVInputFormat*, int, AVFormatParameters*)", referenced from:
ffmpeg_open(AVFormatContext**, char const*, int*)in ccCkx9dd.o
(so forth fo every FFMPEG call)
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
沒有連接dylib我沒有問題。怎麼了?
P.S. ffmpeg的版本爲Mach-O的64位可執行文件x86_64的