当我尝试在OS X 10.9.1上编译libFlac 1.0.3时出现以下错误:
In file included from /usr/local/include/ogg/os_types.h:123:
/usr/local/include/ogg/config_types.h:6:9: error: unknown type name 'uint16_t'
typedef uint16_t ogg_uint16_t;
^
/usr/local/include/ogg/config_types.h:8:9: error: unknown type name 'uint32_t'
typedef uint32_t ogg_uint32_t;
^
2 errors generated.
make[4]: *** [ogg_decoder_aspect.lo] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
我尝试过以下两种情况,但都导致了同样的错误:
从这篇文章: Using libFlac in Mountain Lion
/ configure --disable-asm-optimizations&&使
从此libFlac票证:#405 "-fgnu89-inline" should not be used when building with clang 我编辑了configure.ac文件来替换它:
if test "x$GCC_MAJOR_VERSION$GCC_MINOR_VERSION" = "x42" ; then
XIPH_ADD_CFLAGS([-fgnu89-inline])
fi
fi
用这个:
if test "x$GCC_MAJOR_VERSION$GCC_MINOR_VERSION" = "x42" ; then
if $CC --version 2>&1| grep -q clang ; then
true
else
XIPH_ADD_CFLAGS([-fgnu89-inline])
fi
fi
fi
有谁知道如何解决这个问题?