In function 'int av_clipl_int32_c(int64_t)': error: 'UINT64_C' was not declared in this scope

本文介绍在Cygwin环境下使用NDK编译JNI时遇到的一个错误:'UINT64_C'未声明。该问题出现在FFmpeg的libavutil/common.h文件中。文章提供了具体的解决方法,即在头文件中定义UINT64_C宏。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

cygwin下使用ndk编译jni时遇到的错误:

/ffmpeg/include/libavutil/common.h: In function 'int av_clipl_int32_c(int64_t)':

/ffmpeg/include/libavutil/common.h:178:47: error: 'UINT64_C' was not declared in this scope

解决方法:

修改头文件 /ffmpeg/include/libavutil/common.h

添加如下代码:

#ifndef UINT64_C
#define UINT64_C(value) __CONCAT(value, ULL)
#endif

 

参考:

http://www.cnblogs.com/dyllove98/archive/2013/06/07/3125111.html

 

35 0 F:\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdint In file included from F:/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.9.2/include/c++/cstdint 6 C:\Users\余伟杰\Desktop\哈希算法.cpp from C:\Users\余伟杰\Desktop\哈希算法.cpp 32 2 F:\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\bits\c++0x_warning.h [Error] #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options. 18 7 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'uint32_t' does not name a type 52 23 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'uint8_t' does not name a type 100 5 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'uint32_t' does not name a type 101 5 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'uint32_t' does not name a type 102 5 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'uint8_t' does not name a type 105 26 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'uint8_t' does not name a type 182 30 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'uint8_t' does not name a type 182 46 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'uint32_t' has not been declared 192 30 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'uint32_t' does not name a type 192 47 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'uint8_t' has not been declared 202 40 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'uint8_t' does not name a type C:\Users\余伟杰\Desktop\哈希算法.cpp In member function 'void MD5::reset()': 43 9 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'state' was not declared in this scope 47 9 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'count' was not declared in this scope 48 16 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'buffer' was not declared in this scope C:\Users\余伟杰\Desktop\哈希算法.cpp In member function 'void MD5::update(const int*, size_t)': 53 9 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'uint32_t' was not declared in this scope 55 9 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'index' was not declared in this scope 55 18 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'count' was not declared in this scope 60 9 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'partLen' was not declared in this scope 62 21 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'buffer' was not declared in this scope 64 18 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'i' was not declared in this scope 69 13 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'i' was not declared in this scope 71 17 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'buffer' was not declared in this scope 71 39 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'i' was not declared in this scope C:\Users\余伟杰\Desktop\哈希算法.cpp In member function 'std::string MD5::final()': 76 9 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'uint8_t' was not declared in this scope 77 9 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'uint32_t' was not declared in this scope 78 17 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] expected ';' before 'digest' 79 22 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'uint8_t' does not name a type 82 16 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'count' was not declared in this scope 82 23 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'bits' was not declared in this scope 85 9 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'index' was not declared in this scope 86 9 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'padLen' was not declared in this scope 87 16 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'PADDING' was not declared in this scope 93 16 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'state' was not declared in this scope 93 23 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'digest' was not declared in this scope C:\Users\余伟杰\Desktop\哈希算法.cpp In member function 'void MD5::transform(const int*)': 106 9 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'uint32_t' was not declared in this scope 107 18 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] expected ';' before 'x' 109 23 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'x' was not declared in this scope 112 12 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'a' was not declared in this scope 112 15 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'b' was not declared in this scope 112 18 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'c' was not declared in this scope 112 21 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'd' was not declared in this scope 112 35 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'T' was not declared in this scope 112 39 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'FF' was not declared in this scope 122 40 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'GG' was not declared in this scope 132 40 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'HH' was not declared in this scope 142 40 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'II' was not declared in this scope 151 9 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'state' was not declared in this scope C:\Users\余伟杰\Desktop\哈希算法.cpp In static member function 'static void MD5::decode(const int*, int*, size_t)': 184 27 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'uint32_t' was not declared in this scope 184 36 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] expected ')' before 'input' C:\Users\余伟杰\Desktop\哈希算法.cpp In function 'int main()': 219 39 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] expected '>' before 'uint8_t' 219 39 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] expected '(' before 'uint8_t' 219 39 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'uint8_t' was not declared in this scope 219 47 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] expected primary-expression before '>' token 228 43 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] expected '>' before 'uint8_t' 228 43 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] expected '(' before 'uint8_t' 228 51 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] expected primary-expression before '>' token 232 43 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] expected '>' before 'uint8_t' 232 43 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] expected '(' before 'uint8_t' 232 51 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] expected primary-expression before '>' token 修改代码
07-07
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值