Android NDK开发,JNI调用C++程序编译出现error: ld returned 1 exit status?
ringa_lee
ringa_lee 2017-04-17 17:31:22
0
2
527

各位大神,小弟现在做Android的ndk开发,使用的是Studio,现在是使用jni调用已存在的原生c++代码,生成头文件后,把c++代码拷过来进行调用的时候,编译一直出现Error:error: ld returned 1 exit status,不能编译通过,也加extern "C" 了,ndk路径什么都没问题,而且c++代码在VS上进行编译的时候就能通过,困扰了好久,网上也找不到答案,希望大家帮帮忙。。

Error:error: ld returned 1 exit status
Error:Execution failed for task ':showbaby01:ndkBuild'.
> Process 'command 'D:\.../ndk-build.cmd'' finished with non-zero exit value 2
ringa_lee
ringa_lee

ringa_lee

reply all(2)
迷茫

Post more error information.

刘奇

It is recommended to take a good look at "Advanced Programming with Android C++: Using NDK". Many issues that need attention will be answered for you one by one

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template