HarmonyOS native audio 录制编译报错
/Users/chenyun/Library/Huawei/Sdk/openharmony/X86SDK/HarmonyOS-NEXT-DP2/base/native/llvm/bin/clang++ --target=aarch64-linux-ohos --gcc-toolchain=/Users/chenyun/Library/Huawei/Sdk/openharmony/X86SDK/HarmonyOS-NEXT-DP2/base/native/llvm --sysroot=/Users/chenyun/Library/Huawei/Sdk/openharmony/X86SDK/HarmonyOS-NEXT-DP2/base/native/sysroot -Dcorelib_EXPORTS -I/Users/chenyun/Library/Huawei/Sdk/openharmony/X86SDK/HarmonyOS-NEXT-DP2/hms/native/sysroot/usr/include -I/Users/chenyun/projects/harmonyOs/harmonyOs-lib/corelib/src/main/cpp -I/Users/chenyun/projects/harmonyOs/harmonyOs-lib/corelib/src/main/cpp/include -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -fno-addrsig -Wa,--noexecstack -Wformat -Werror=format-security -D__MUSL__ -O0 -g -fno-limit-debug-info -fPIC -MD -MT CMakeFiles/corelib.dir/hello.cpp.o -MF CMakeFiles/corelib.dir/hello.cpp.o.d -o CMakeFiles/corelib.dir/hello.cpp.o -c /Users/chenyun/projects/harmonyOs/harmonyOs-lib/corelib/src/main/cpp/hello.cpp
clang++: warning: argument unused during compilation: '--gcc-toolchain=/Users/chenyun/Library/Huawei/Sdk/openharmony/X86SDK/HarmonyOS-NEXT-DP2/base/native/llvm' [-Wunused-command-line-argument]
In file included from /Users/chenyun/projects/harmonyOs/harmonyOs-lib/corelib/src/main/cpp/hello.cpp:6:
In file included from /Users/chenyun/projects/harmonyOs/harmonyOs-lib/corelib/src/main/cpp/AudioRecordWrap.h:7:
In file included from /Users/chenyun/projects/harmonyOs/harmonyOs-lib/corelib/src/main/cpp/AudioRecord.h:16:
In file included from /Users/chenyun/Library/Huawei/Sdk/openharmony/X86SDK/HarmonyOS-NEXT-DP2/base/native/sysroot/usr/include/sys/stat.h:23:
/Users/chenyun/Library/Huawei/Sdk/openharmony/X86SDK/HarmonyOS-NEXT-DP2/base/native/sysroot/usr/include/aarch64-linux-ohos/bits/stat.h:1:8: error: redefinition of 'stat'
struct stat {
^
/Users/chenyun/Library/Huawei/Sdk/openharmony/X86SDK/HarmonyOS-NEXT-DP2/base/native/sysroot/usr/include/asm-generic/stat.h:23:8: note: previous definition is here
struct stat {
^
1 error generated.
ninja: build stopped: subcommand failed.
Detail: Please check the message from tools.
> hvigor ERROR: BUILD FAILED in 4 s 16 ms
HarmonyOS
赞
收藏 0
回答 1
待解决
相关问题
HarmonyOS MultiHap项目运行,点击audio按钮、跳转不到audio页面,报错16000001
467浏览 • 1回复 待解决
HarmonyOS react-native-webview 13.10.2-nc.0.0.1 编译报错
170浏览 • 1回复 待解决
HarmonyOS react-native-harmony-svg 13.14.0-0.3.12 编译报错
128浏览 • 1回复 待解决
HarmonyOS升级版本后,Native编译第三方库会报错
588浏览 • 1回复 待解决
HarmonyOS 录制屏幕 录制摄像头咨询
433浏览 • 1回复 待解决
HarmonyOS 语音录制上架时录制失败
59浏览 • 1回复 待解决
HarmonyOS OH_Audio 需要提供 mute 方法
420浏览 • 1回复 待解决
HarmonyOS音频录制相关
351浏览 • 1回复 待解决
如何录制视频并设置最大录制时长?
122浏览 • 0回复 待解决
HarmonyOS 配置"strictMode": { "useNormalizedOHMUrl": true }后编译报错
116浏览 • 1回复 待解决
HarmonyOS 对系统相机录制的视频(HDR Vivid录制) 进行转码压缩
614浏览 • 1回复 待解决
编译报错没有堆栈信息
879浏览 • 1回复 待解决
openharmony 交叉编译openjdk报错
887浏览 • 1回复 待解决
编译报错Found exception如下
1398浏览 • 1回复 待解决
HarmonyOS 编译50兆js文件,编译50分钟后报错
303浏览 • 1回复 待解决
native c++ assimp源码融入工程编译无报错,模拟器运行闪退怎么回事?
769浏览 • 1回复 待解决
HarmonyOS 在录制视频时,设置了录制的时长为10s,怎么根据录制时长来实现录制按钮的倒计时效果?
214浏览 • 1回复 待解决
OH _Audio播放音频问题
2115浏览 • 1回复 待解决
HarmonyOS 视频录制相关问题
396浏览 • 0回复 待解决
HarmonyOS 音频录制与播放
620浏览 • 1回复 待解决
HarmonyOS 录制视频的时候怎么限制录制时长为2-10秒(第10秒的时候要中断录制,需要获取录制进度)?
179浏览 • 1回复 待解决
native交叉编译第三方库
191浏览 • 1回复 待解决
HarmonyOS C++库使用aki库,编译报错
289浏览 • 1回复 待解决
HarmonyOS API 10 无法集成 AGC SDK,编译报错
836浏览 • 1回复 待解决
提供的代码是native用法,C接口不能这么用,需要用OH_AVBUFFER的相关接口,可以参考以下链接:
https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/_core-V5#oh_avbuffer_create
需要改成接口的写法。
用这些。