Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Objective c 无法建造;架构x86_64的未定义符号:_Objective C_Xcode_Macos_Compilation_Ffmpeg - Fatal编程技术网

Objective c 无法建造;架构x86_64的未定义符号:

Objective c 无法建造;架构x86_64的未定义符号:,objective-c,xcode,macos,compilation,ffmpeg,Objective C,Xcode,Macos,Compilation,Ffmpeg,在尝试创建RTSP屏幕流媒体服务器的过程中,我尝试以CocoaSplit为例 问题是,我无法编译它 我已经在我的计算机上安装了FFMpeg,使用自制软件,遵循FFMpeg上的指南 但在编译时,Xcode抛出了如下错误 Undefined symbols for architecture x86_64: "_cmnMemAlloc", referenced from:_aac_encode_init in libavcodec.a(libvo-aacenc.o) "_cmnMemCheck",

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

问题是,我无法编译它

我已经在我的计算机上安装了FFMpeg,使用自制软件,遵循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


这里似乎有什么问题?

我知道参加聚会迟到了,但我也遇到了同样的问题,也许我的解决方案对未来的其他可怜的人有用

问题是缺少一个名为lib aacenc的库。Mine位于此处,由自制软件安装,似乎:

usr/local/Cell/libvo aacenc/0.1.3/lib/

我认为这是通过自制安装ffmpeg的一部分。至少,如果我这样做:

brew信息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
正如您所看到的,您必须实际指定-如果没有libvo aacenc,就不能安装它

但是,是的,简而言之,如果您开始看到关于lib aacenc的链接器错误,那么它可能位于此处附近的某个位置:


usr/local/ceral/libvo-aacenc/0.1.3/lib/

libvo-aacenc是一个非常差的AAC编码器,最近FFmpeg中已经取消了对它的支持。因为您正在编译,所以我建议改用libfdk aac。如果使用该选项,还可以删除libfaac依赖项。有关更多信息,请参阅和。感谢您的回复@LordNeckbeard,并感谢您的链接。知道这里可能不是问这个的地方,我会冒昧地问你,希望你有一些建议。我正在尝试编写一个使用FFMPEG的OSX应用程序。由于我不能确定用户的机器上是否安装了FFMPEG,我猜我必须将所有相关的.a文件和头文件包含到我的项目中,并设置链接器标志和头搜索路径。你知道像我这样无知的iOS/OS X开发人员可以在哪里读到更多关于如何正确实现这一点的信息吗?除非你正在使用库,否则你可能必须在应用程序中分发ffmpeg二进制文件?。对不起,如果我能把我算在内的话,我会帮上更多的忙。再次感谢你的回复。我打算构建一个OSX应用程序,使用FFMPEG中的一些功能。到目前为止,我已经将相关的.a文件从FFMPEG位置/usr/local/ceral/FFMPEG/version/lib复制到我自己项目中的目录中,并为它们添加了链接器设置,但这很麻烦,我希望我用错误的方式来做这件事,还有另一种更好的方式,有文件记录,有插图,还有我没有找到的一切,但我会继续寻找:-