2015-05-19 71 views
0

我在编译FFmpeg-Vitamio时遇到以下编译错误。函数'lseek64'的隐式声明在C99中无效

我的操作系统是的Mac OS X 10.10.9

NDK版本:的Android NDK,r10d

gcc版本:

$gcc --version 
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 
Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn) 
Target: x86_64-apple-darwin14.1.1 
Thread model: posix 

错误消息:

libavformat/fd.c:59:9: error: implicit declaration of function 'lseek64' is invalid in C99 [-Werror,-Wimplicit-function-declaration] 
    return lseek64(fd, pos, whence); 
+0

所以你在Mac上使用Mac的命令行工具编译,它怎么到Android有关? –

+0

@AntonSavin因为它明显涉及到android NDK。请阅读 –

+0

@AntonSavin也许海湾合作委员会版本:困惑。是的,正如Ed George所说,我使用NDK r10d。 –

回答

0

for Linux系统,使用方法:

#define _LARGEFILE64_SOURCE  /* See feature_test_macros(7) */ 
#include <sys/types.h> 
#include <unistd.h> 

到有lseek64

正确的原型,我不知道这将如何涉及到Mac OS和使用ARM-Linux的antroideabi-GCC工具

0

@anton是对的。

gcc的错误使用,

${NDK_HOME}/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc 

应该使用

相关问题