gpt4 book ai didi

objective-c - 无法构建;架构 x86_64 : 的 undefined symbol

转载 作者:行者123 更新时间:2023-12-04 23:03:56 24 4
gpt4 key购买 nike

在尝试创建 RTSP 屏幕流服务器的过程中,我尝试以 CocoaSplit 为例。

问题是,我无法编译它。

我按照 FFMpeg 的 https://trac.ffmpeg.org/wiki/CompilationGuide/MacOSX 指南使用 Homebrew 在我的计算机上安装了 FFMpeg .

但是在编译时,Xcode 会抛出错误,例如

Undefined symbols for architecture x86_64:

"_cmnMemAlloc", referenced from:_aac_encode_init in libavcodec.a(libvo-aacenc.o)
"_cmnMemCheck", referenced from:_aac_encode_init in libavcodec.a(libvo-aacenc.o)
"_cmnMemCopy", referenced from:_aac_encode_init in libavcodec.a(libvo-aacenc.o)
"_cmnMemFree", referenced from:_aac_encode_init in libavcodec.a(libvo-aacenc.o)
"_cmnMemSet", referenced from:_aac_encode_init in libavcodec.a(libvo-aacenc.o)

等等。

项目设置中的标题搜索路径字段的目录为 /usr/local/include在里面。

这里似乎有什么问题?

最佳答案

Waaaay 我知道的派对迟到了,但我也遇到了同样的问题,也许我的解决方案对 future 其他一些可怜的灵魂有用。

问题是您缺少一个名为 lib-aacenc 的库。 .我的位于此处(似乎由 Homebrew 安装):
usr/local/Cellar/libvo-aacenc/0.1.3/lib/
我认为这是通过 Homebrew 安装 ffmpeg 的一部分。至少,如果我这样做:
brew info ffmpeg
我得到了返回:

ffmpeg: stable 2.8, HEAD
Play, record, convert, and stream audio and video
https://ffmpeg.org/
/usr/local/Cellar/ffmpeg/2.8 (215 files, 47M) *
Built from source with: --with-ffplay
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/ffmpeg.rb
==> Dependencies
Build: pkg-config ✔, texi2html ✔, yasm ✔
Recommended: x264 ✔, lame ✔, libvo-aacenc ✔, xvid ✔
Optional: faac ✘, fontconfig ✘, freetype ✔, theora ✘, libvorbis ✔, libvpx ✘, rtmpdump ✘, opencore-amr ✘, libass ✘, openjpeg ✘, speex ✘, schroedinger ✘, fdk-aac ✘, opus ✘, frei0r ✘, libcaca ✘, libbluray ✘, libsoxr ✘, libquvi ✘, libvidstab ✘, x265 ✘, openssl ✘, libssh ✘, webp ✘, zeromq ✘
==> Options
--with-faac
Build with faac support
--with-fdk-aac
Enable the Fraunhofer FDK AAC library
--with-ffplay
Enable FFplay media player
--with-fontconfig
Build with fontconfig support
--with-freetype
Build with freetype support
--with-frei0r
Build with frei0r support
--with-libass
Enable ASS/SSA subtitle format
--with-libbluray
Build with libbluray support
--with-libcaca
Build with libcaca support
--with-libquvi
Build with libquvi support
--with-libsoxr
Enable the soxr resample library
--with-libssh
Enable SFTP protocol via libssh
--with-libvidstab
Enable vid.stab support for video stabilization
--with-libvorbis
Build with libvorbis support
--with-libvpx
Build with libvpx support
--with-opencore-amr
Enable Opencore AMR NR/WB audio format
--with-openjpeg
Enable JPEG 2000 image format
--with-openssl
Enable SSL support
--with-opus
Build with opus support
--with-rtmpdump
Enable RTMP protocol
--with-schroedinger
Enable Dirac video format
--with-speex
Build with speex support
--with-theora
Build with theora support
--with-tools
Enable additional FFmpeg tools
--with-webp
Enable using libwebp to encode WEBP images
--with-x265
Enable x265 encoder
--with-zeromq
Enable using libzeromq to receive commands sent through a libzeromq client
--without-lame
Disable MP3 encoder
--without-libvo-aacenc
Disable VisualOn AAC encoder
--without-qtkit
Disable deprecated QuickTime framework
--without-x264
Disable H.264 encoder
--without-xvid
Disable Xvid MPEG-4 video encoder
--HEAD
Install HEAD version
==> Caveats
FFmpeg has been built without libfaac for licensing reasons;
libvo-aacenc is used by default.
To install with libfaac, you can:
brew reinstall ffmpeg --with-faac

You can also use the experimental FFmpeg encoder, libfdk-aac, or
libvo_aacenc to encode AAC audio:
ffmpeg -i input.wav -c:a aac -strict experimental output.m4a
Or:
brew reinstall ffmpeg --with-fdk-aac
ffmpeg -i input.wav -c:a libfdk_aac output.m4a

如您所见,您必须实际指定 --without-libvo-aacenc没有安装它。

但是,是的,简而言之,如果您开始看到有关 lib-aacenc 的链接器错误,那么它可能位于此处附近的某个地方:
usr/local/Cellar/libvo-aacenc/0.1.3/lib/

关于objective-c - 无法构建;架构 x86_64 : 的 undefined symbol ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28102268/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com