当前位置:网站首页>[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 ;
边栏推荐
- SSRF vulnerability exploitation - attack redis
- Leetcode 146. LRU cache
- A method for detecting outliers of data
- Three paradigms of database design
- 微服務入門:Gateway網關
- Example analysis of C # read / write lock
- Leetcode 23. Merge K ascending linked lists
- Guanghetong's high-performance 4g/5g wireless module solution comprehensively promotes an efficient and low-carbon smart grid
- The second session of the question swiping and punching activity -- solving the switching problem with recursion as the background (I)
- Need help resetting PHP counters - PHP
猜你喜欢
User login function: simple but difficult
Codeforces Round #750 (Div. 2)(A,B,C,D,F1)
随机事件的关系与运算
1. Kalman filter - the best linear filter
Private collection project practice sharing [Yugong series] February 2022 U3D full stack class 007 - production and setting skybox resources
What does range mean in PHP
Sports [running 01] a programmer's half horse challenge: preparation before running + adjustment during running + recovery after running (experience sharing)
Developers really review CSDN question and answer function, and there are many improvements~
manjaro安装微信
awk从入门到入土(12)awk也可以写脚本,替代shell
随机推荐
C # implements a queue in which everything can be sorted
How to use C language code to realize the addition and subtraction of complex numbers and output structure
Xcode 6 swift code completion does not work properly - Xcode 6 swift code completion not working
随机事件的关系与运算
Comparison between sentinel and hystrix
Codeforces Round #803 (Div. 2)(A-D)
Four essential material websites for we media people to help you easily create popular models
[go basics] 1 - go go
1. Kalman filter - the best linear filter
What sparks can applet container technology collide with IOT
awk从入门到入土(9)循环语句
The second session of the question swiping and punching activity -- solving the switching problem with recursion as the background (I)
小程序容器技术与物联网 IoT 可以碰撞出什么样的火花
What if the wireless network connection of the laptop is unavailable
string. Format without decimal places will generate unexpected rounding - C #
Getting started with microservices: gateway gateway
AcWing 244. Enigmatic cow (tree array + binary search)
SQL statement view SQL Server 2005 version number
From scratch, use Jenkins to build and publish pipeline pipeline project
Openfeign service interface call