当前位置:网站首页>[error record] no matching function for call to 'cacheflush' cacheflush();)
[error record] no matching function for call to 'cacheflush' cacheflush();)
2022-07-04 08:40:00 【Programmer community】
One 、 Error message
Use Visual Studio 2019 compile Android Platform NDK project ; Compile times error ;
Error message :
1>./native/native.cpp(428,14): warning G0C39A92D: 'SearchCode' has C-linkage specified, but returns user-defined type 'std::string' (aka 'basic_string<char>') which is incompatible with C [-Wreturn-type-c-linkage]1> std::string SearchCode(unsigned char* data,unsigned size){
1> ^1>./native/native.cpp(658,5): error GEF7559A7: no matching function for call to 'cacheflush'1> cacheflush();1> ^~~~~~~~~~1>D:/001_Develop/001_SDK/Sdk/ndk/android-ndk-r14b/build//../platforms/android-19/arch-arm/usr/include\unistd.h:183:12: note: candidate function not viable: requires 3 arguments, but 0 were provided1>extern int cacheflush(long start, long end, long flags);1> ^1>1 warning and 1 error generated.1>make: *** [obj/local/armeabi-v7a/objs/native/native/native.o] Error 11>D:\001_Develop\017_Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(46,5): error MSB3073: command “"D:\001_Develop\001_SDK\Sdk\ndk\android-ndk-r14b\build\ndk-build.cmd" NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=Android.mk NDK_APPLICATION_MK=Application.mk ” Exited , The code is 2.1> The build project is complete “magic.vcxproj” The operation of - Failure .========== Generate : success 0 individual , Failure 1 individual , newest 0 individual , skip 0 individual ==========
Two 、 Error message
Study the error message carefully , Find out D:/001_Develop/001_SDK/Sdk/ndk/android-ndk-r14b/build//../platforms/android-19/arch-arm/usr/include\unistd.h:183:12: note: candidate function not viable: requires 3 arguments, but 0 were provided
, The called function header file is android-19/arch-arm/usr/include\unistd.h
, This is a ARM Header file for platform , The functions defined are ARM Functions of Architecture ;
stay ARM Architecturally android-19/arch-arm/usr/include/unistd.h
Header file , cacheflush
Function is :
extern int cacheflush(long start, long end, long flags);
stay x86 The system call in the schema is invalid ;
If the target of the compilation function library or Executable file The architecture has x86 framework , You're going to report a mistake , Because this function only supports ARM framework ;
#ifndef __i386__ cacheflush();
stay Application.mk in , To declare only x86 Compile function library , Comment out armeabi-v7a
armeabi
These two target architectures ;
APP_ABI := x86 #armeabi-v7a armeabiAPP_STL := gnustl_staticAPP_PLATFORM := android-19
involve CPU In operation , Pay attention to the compiled Architecture , And referenced dependent Libraries ;
cacheflush
The function is the refresh function in the system call CPU Cached functions , Different CPU framework , The corresponding implementation is also different ;
边栏推荐
- 1. Getting started with QT
- DM database password policy and login restriction settings
- [go basics] 1 - go go
- ctfshow web255 web 256 web257
- Example analysis of C # read / write lock
- Mouse over to change the transparency of web page image
- Famous blackmail software stops operation and releases decryption keys. Most hospital IOT devices have security vulnerabilities | global network security hotspot on February 14
- Unity write word
- 2022 tower crane driver examination and tower crane driver examination questions and analysis
- Redis sentinel mechanism
猜你喜欢
Question 49: how to quickly determine the impact of IO latency on MySQL performance
es6总结
Codeforces Round #793 (Div. 2)(A-D)
【无标题】转发最小二乘法
Codeforces Round #750 (Div. 2)(A,B,C,D,F1)
DM database password policy and login restriction settings
[go basics] 1 - go go
std::is_ union,std::is_ class,std::integral_ constant
Leetcode topic [array] -136- numbers that appear only once
Newh3c - routing protocol (RIP, OSPF)
随机推荐
Group programming ladder race - exercise set l1-006 continuity factor
Snipaste convenient screenshot software, which can be copied on the screen
Openfeign service interface call
Cancel ctrl+alt+delete when starting up
C # implements a queue in which everything can be sorted
Comparison between sentinel and hystrix
Codeforces Global Round 21(A-E)
DM8 database recovery based on point in time
yolov5 xml数据集转换为VOC数据集
Unity write word
没有Kubernetes怎么玩Dapr?
awk从入土到入门(10)awk内置函数
Famous blackmail software stops operation and releases decryption keys. Most hospital IOT devices have security vulnerabilities | global network security hotspot on February 14
FOC控制
Xcode 6 swift code completion does not work properly - Xcode 6 swift code completion not working
manjaro安装微信
Newh3c - network address translation (NAT)
How to send pictures to the server in the form of file stream through the upload control of antd
DM8 command line installation and database creation
Azure ad domain service (II) configure azure file share disk sharing for machines in the domain service