在Mac OS X上编译mp4v2

时间:2010-06-25 07:06:26

标签: c++ xcode stl macos g++

有人可以帮我在Mac OS X上编译mp4v2吗?我已经尝试按照说明进行配置和编译,但是我收到了很多来自C ++头文件的错误。 configure命令为./configure --enable-ub,后面是终端的make

从错误消息的外观来看,我的安装中似乎缺少许多头文件。问题是我没有删除任何头文件并从安装程序DMG中按原样安装Xcode。

似乎这些文件是必需的,但在我的Xcode安装中不存在:

  • /usr/include/c++/4.2.1/bits/c++config.h
  • /usr/include/c++/4.2.1/bits/c++locale.h
  • /usr/include/c++/4.2.1/bits/c++io.h
  • /usr/include/c++/4.2.1/bits/ghtr.h
  • /usr/include/c++/4.2.1/bits/atomic_word.h
  • (然后是一些)

它们都包含在系统提供的STL C ++标题中(所有引用这些丢失文件的文件都在/user/include/c++/4.2.1中。

任何人都可以帮忙告诉我在哪里可以获得这些“丢失”的头文件?

以下是所涉及的每个软件的版本详细信息:

  • Snow Leopard 10.6.4
  • Xcode 3.2.3(iOS SDK 4.0附带的那个)
  • MP4v2 1.9.1
  • i686-apple-darwin10-g ++ - 4.2.1(GCC)4.2.1(Apple Inc. build 5664)

以下是错误消息的一些摘录:

g++ -DHAVE_CONFIG_H   -arch i386 -arch x86_64 -arch ppc -arch ppc64 -I./include -I./include -I. -I.  -Wall -Wformat -g -O2 -fvisibility=hidden  -c libplatform/impl.h -o libplatform/impl.h.gch/static
In file included from /usr/include/c++/4.2.1/ios:43,
                 from /usr/include/c++/4.2.1/istream:44,
                 from /usr/include/c++/4.2.1/fstream:45,
                 from ./libplatform/platform_base.h:6,
                 from ./libplatform/platform_posix.h:31,
                 from ./libplatform/platform.h:24,
                 from libplatform/impl.h:6:
/usr/include/c++/4.2.1/iosfwd:44:28: error: bits/c++config.h: No such file or directory
/usr/include/c++/4.2.1/iosfwd:45:29: error: bits/c++locale.h: No such file or directory
/usr/include/c++/4.2.1/iosfwd:46:25: error: bits/c++io.h: No such file or directory
In file included from /usr/include/c++/4.2.1/bits/ios_base.h:45,
                 from /usr/include/c++/4.2.1/ios:48,
                 from /usr/include/c++/4.2.1/istream:44,
                 from /usr/include/c++/4.2.1/fstream:45,
                 from ./libplatform/platform_base.h:6,
                 from ./libplatform/platform_posix.h:31,
                 from ./libplatform/platform.h:24,
                 from libplatform/impl.h:6:
/usr/include/c++/4.2.1/ext/atomicity.h:39:23: error: bits/gthr.h: No such file or directory
/usr/include/c++/4.2.1/ext/atomicity.h:40:30: error: bits/atomic_word.h: No such file or directory
In file included from /usr/include/c++/4.2.1/memory:54,
                 from /usr/include/c++/4.2.1/string:48,
                 from /usr/include/c++/4.2.1/bits/locale_classes.h:47,
                 from /usr/include/c++/4.2.1/bits/ios_base.h:47,
                 from /usr/include/c++/4.2.1/ios:48,
                 from /usr/include/c++/4.2.1/istream:44,
                 from /usr/include/c++/4.2.1/fstream:45,
                 from ./libplatform/platform_base.h:6,
                 from ./libplatform/platform_posix.h:31,
                 from ./libplatform/platform.h:24,
                 from libplatform/impl.h:6:

由于

1 个答案:

答案 0 :(得分:0)

我终于做对了:

./configure --disable-gch --enable-ub=ppc,i386,x86_64

请参阅mp4v2 issue 58

此外,you use Snow Leopard to build but you also want mp4v2 to be usable under Leopard时需要执行其他步骤。

由于