当前位置:网站首页>[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 ;
边栏推荐
- awk从入门到入土(18)gawk线上手册
- Guanghetong's high-performance 4g/5g wireless module solution comprehensively promotes an efficient and low-carbon smart grid
- [BSP video tutorial] stm32h7 video tutorial phase 5: MDK topic, system introduction to MDK debugging, AC5, AC6 compilers, RTE development environment and the role of various configuration items (2022-
- Educational Codeforces Round 115 (Rated for Div. 2)
- How to get bytes containing null terminators from a string- c#
- [CV] Wu Enda machine learning course notes | Chapter 9
- Bishi blog (13) -- oral arithmetic test app
- awk从入门到入土(12)awk也可以写脚本,替代shell
- The basic syntax of mermaid in typera
- Azure ad domain service (II) configure azure file share disk sharing for machines in the domain service
猜你喜欢
ArcGIS application (XXII) ArcMap loading lidar Las format data
From scratch, use Jenkins to build and publish pipeline pipeline project
Newh3c - routing protocol (RIP, OSPF)
DM database password policy and login restriction settings
Démarrage des microservices: passerelle
Codeforces Round #750 (Div. 2)(A,B,C,D,F1)
awk从入门到入土(12)awk也可以写脚本,替代shell
没有Kubernetes怎么玩Dapr?
yolov5 xml数据集转换为VOC数据集
1. Kalman filter - the best linear filter
随机推荐
[performance test] read JMeter
C # implements a queue in which everything can be sorted
How to solve the problem of computer jam and slow down
Leetcode 23. Merge K ascending linked lists
System disk expansion in virtual machine
Four essential material websites for we media people to help you easily create popular models
MySQL relearn 1-centos install mysql5.7
How to re enable local connection when the network of laptop is disabled
[CV] Wu Enda machine learning course notes | Chapter 9
OpenFeign 服务接口调用
Private collection project practice sharing [Yugong series] February 2022 U3D full stack class 007 - production and setting skybox resources
awk从入门到入土(8)数组
A method for detecting outliers of data
DM8 command line installation and database creation
awk从入门到入土(15)awk执行外部命令
The right way to capture assertion failures in NUnit - C #
09 softmax regression + loss function
Cancel ctrl+alt+delete when starting up
Parallel shift does not provide any acceleration - C #
deno debugger