androidStudio2.2 使用cmake编译c/c++出现问题

shjte 2017-07-13 08:37:35
错误代码如下:
Error:FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:externalNativeBuildDebug'.
> Build command failed.
Error while executing 'D:\eclipseAll\sdk\cmake\3.6.4111459\bin\cmake.exe' with arguments {--build D:\androidStudios\FFmpeg\app\.externalNativeBuild\cmake\debug\armeabi --target ffmpeg}
[1/2] Building C object CMakeFiles/ffmpeg.dir/jnicode/jni/ffmpeg.c.o
FAILED: D:\eclipseAll\sdk\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin\clang.exe --target=armv5te-none-linux-androideabi --gcc-toolchain=D:/eclipseAll/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64 --sysroot=D:/eclipseAll/sdk/ndk-bundle/sysroot -Dffmpeg_EXPORTS -I../../../../ffmpeg-3.3.2 -isystem D:/eclipseAll/sdk/ndk-bundle/sysroot/usr/include/arm-linux-androideabi -D__ANDROID_API__=17 -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -march=armv5te -mtune=xscale -msoft-float -fno-integrated-as -mthumb -Wa,--noexecstack -Wformat -Werror=format-security -O0 -fno-limit-debug-info -fPIC -MD -MT CMakeFiles/ffmpeg.dir/jnicode/jni/ffmpeg.c.o -MF CMakeFiles\ffmpeg.dir\jnicode\jni\ffmpeg.c.o.d -o CMakeFiles/ffmpeg.dir/jnicode/jni/ffmpeg.c.o -c D:\androidStudios\FFmpeg\app\jnicode\jni\ffmpeg.c
D:\androidStudios\FFmpeg\app\jnicode\jni\ffmpeg.c:227:9: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
av_buffersrc_add_frame_flags(ist->filters[i]->filter, frame,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:\androidStudios\FFmpeg\app\jnicode\jni\ffmpeg.c:258:18: warning: assigning to 'int8_t *' (aka 'signed char *') from 'uint8_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
dst = frame->data [0];
^ ~~~~~~~~~~~~~~~~~~
D:\androidStudios\FFmpeg\app\jnicode\jni\ffmpeg.c:261:29: warning: passing 'int8_t *' (aka 'signed char *') to parameter of type 'uint8_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
sub2video_copy_rect(dst, dst_linesize, frame->width, frame->height, sub->rects[i]);
^~~
D:\androidStudios\FFmpeg\app\jnicode\jni\ffmpeg.c:188:42: note: passing argument to parameter 'dst' here
static void sub2video_copy_rect(uint8_t *dst, int dst_linesize, int w, int h,
^
D:\androidStudios\FFmpeg\app\jnicode\jni\ffmpeg.c:302:9: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
av_buffersrc_add_frame(ist->filters[i]->filter, NULL);
^~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:\androidStudios\FFmpeg\app\jnicode\jni\ffmpeg.c:1829:35: warning: passing 'char *' to parameter of type 'const unsigned char *' converts between pointers to integer types with different sign [-Wpointer-sign]
avio_write(progress_avio, buf_script.str,
^~~~~~~~~~~~~~
../../../../ffmpeg-3.3.2\libavformat/avio.h:448:54: note: passing argument to parameter 'buf' here
void avio_write(AVIOContext *s, const unsigned char *buf, int size);
^
D:\androidStudios\FFmpeg\app\jnicode\jni\ffmpeg.c:2092:19: warning: 'avpicture_fill' is deprecated [-Wdeprecated-declarations]
int ret = avpicture_fill(&pict, opkt.data, ost->st->codecpar->format, ost->st->codecpar->width, ost->st->codecpar->height);
^
../../../../ffmpeg-3.3.2\libavcodec/avcodec.h:5545:1: note: 'avpicture_fill' has been explicitly marked deprecated here
attribute_deprecated
^
../../../../ffmpeg-3.3.2\libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
# define attribute_deprecated __attribute__((deprecated))
^
D:\androidStudios\FFmpeg\app\jnicode\jni\ffmpeg.c:2166:13: warning: 5 enumeration values not handled in switch: 'AVMEDIA_TYPE_UNKNOWN', 'AVMEDIA_TYPE_DATA', 'AVMEDIA_TYPE_SUBTITLE'... [-Wswitch]
switch (ifilter->ist->st->codecpar->codec_type) {
^
D:\androidStudios\FFmpeg\app\jnicode\jni\ffmpeg.c:2731:17: warning: 5 enumeration values not handled in switch: 'AVMEDIA_TYPE_UNKNOWN', 'AVMEDIA_TYPE_DATA', 'AVMEDIA_TYPE_SUBTITLE'... [-Wswitch]
switch (ist->dec_ctx->codec_type) {
^
D:\androidStudios\FFmpeg\app\jnicode\jni\ffmpeg.c:3112:13: warning: 5 enumeration values not handled in switch: 'AVMEDIA_TYPE_UNKNOWN', 'AVMEDIA_TYPE_DATA', 'AVMEDIA_TYPE_SUBTITLE'... [-Wswitch]
switch (par_dst->codec_type) {
^
D:\androidStudios\FFmpeg\app\jnicode\jni\ffmpeg.c:3179:20: warning: passing 'uint8_t *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
av_strlcpy(encoder_string, LIBAVCODEC_IDENT " ", encoder_string_len);
^~~~~~~~~~~~~~
../../../../ffmpeg-3.3.2\libavutil/avstring.h:100:25: note: passing argument to parameter 'dst' here
size_t av_strlcpy(char *dst, const char *src, size_t size);
^
D:\androidStudios\FFmpeg\app\jnicode\jni\ffmpeg.c:3181:20: warning: passing 'uint8_t *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
av_strlcpy(encoder_string, "Lavc ", encoder_string_len);
^~~~~~~~~~~~~~
../../../../ffmpeg-3.3.2\libavutil/avstring.h:100:25: note: passing argument to parameter 'dst' here
size_t av_strlcpy(char *dst, const char *src, size_t size);
^
D:\androidStudios\FFmpeg\app\jnicode\jni\ffmpeg.c:3182:16: warning: passing 'uint8_t *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
av_strlcat(encoder_string, ost->enc->name, encoder_string_len);
^~~~~~~~~~~~~~
../../../../ffmpeg-3.3.2\libavutil/avstring.h:118:25: note: passing argument to parameter 'dst' here
size_t av_strlcat(char *dst, const char *src, size_t size);
^
D:\androidStudios\FFmpeg\app\jnicode\jni\ffmpeg.c:3183:49: warning: passing 'uint8_t *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
av_dict_set(&ost->st->metadata, "encoder", encoder_string,
^~~~~~~~~~~~~~
../../../../ffmpeg-3.3.2\libavutil/dict.h:130:65: note: passing argument to parameter 'value' here
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags);
^
D:\androidStudios\FFmpeg\app\jnicode\jni\ffmpeg.c:3478:15: warning: 'avcodec_copy_context' is deprecated [-Wdeprecated-declarations]
ret = avcodec_copy_context(ost->st->codec, ost->enc_ctx);
^
../../../../ffmpeg-3.3.2\libavcodec/avcodec.h:4325:1: note: 'avcodec_copy_context' has been explicitly marked deprecated here
attribute_deprecated
^
../../../../ffmpeg-3.3.2\libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
# define attribute_deprecated __attribute__((deprecated))
^
D:\androidStudios\FFmpeg\app\jnicode\jni\ffmpeg.c:3478:45: warning: 'codec' is deprecated [-Wdeprecated-declarations]
ret = avcodec_copy_context(ost->st->codec, ost->enc_ctx);
^
../../../../ffmpeg-3.3.2\libavformat/avformat.h:892:5: note: 'codec' has been explicitly marked deprecated here
attribute_deprecated
^
../../../../ffmpeg-3.3.2\libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
# define attribute_deprecated __attribute__((deprecated))
^
D:\androidStudios\FFmpeg\app\jnicode\jni\ffmpeg.c:3520:45: warning: passing 'uint32_t *' (aka 'unsigned int *') to parameter of type 'int32_t *' (aka 'int *') converts between pointers to integer types with different sign [-Wpointer-sign]
av_display_rotation_set((uint32_t *)dst, 0);
^~~~~~~~~~~~~~~
../../../../ffmpeg-3.3.2\libavutil/display.h:76:38: note: passing argument to parameter 'matrix' here
void av_display_rotation_set(int32_t matrix[9], double angle);
^
D:\androidStudios\FFmpeg\app\jnicode\jni\ffmpeg.c:3532:18: warning: 'codec' is deprecated [-Wdeprecated-declarations]
ost->st->codec->codec= ost->enc_ctx->codec;
^
../../../../ffmpeg-3.3.2\libavformat/avformat.h:892:5: note: 'codec' has been explicitly marked deprecated here
attribute_deprecated
^
../../../../ffmpeg-3.3.2\libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
# define attribute_deprecated __attribute__((deprecated))
^
D:\androidStudios\FFmpeg\app\jnicode\jni\ffmpeg.c:3919:43: warning: 'codec' is deprecated [-Wdeprecated-declarations]
debug = input_streams[0]->st->codec->debug<<1;
^


...全文
329 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

80,351

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧