简体   繁体   English

函数'lseek64'的隐式声明在C99中无效

[英]implicit declaration of function 'lseek64' is invalid in C99

I have got the following compile error while compiling the FFmpeg-Vitamio . 编译FFmpeg-Vitamio时出现以下编译错误。

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

NDK version: android-ndk-r10d NDK版本: android-ndk-r10d

Gcc version: 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

Error message: 错误信息:

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

for a linux system, use: 对于linux系统,请使用:

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

to have a proper prototype for lseek64 为lseek64设计合适的原型

I'm not sure how this will relate to the mac OS and using the arm-linux-antroideabi-gcc tool 我不确定这将与mac OS和使用arm-linux-antroideabi-gcc工具有什么关系

@anton is right. @anton是正确的。

Wrong gcc is used, 使用了错误的gcc,

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

is supposed to used 应该用

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM