Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- **target_link_libraries(
- native-lib
- ${log-lib}
- ${CMAKE_SOURCE_DIR}/libadd.a)**
- #include <jni.h>
- #include <string>
- #include "../../../staticLib/files/add.hpp"
- extern "C" JNIEXPORT jstring JNICALL
- Java_com_example_oncall_myapplication_MainActivity_stringFromJNI(
- JNIEnv* env,
- jobject /* this */) {
- std::string hello = "Hello SUCESSS its 12";
- std::string hello1 = "Hello FAILED it is not 12";
- addition::my::work::abc Obj;
- Obj.add(5,7);
- if(Obj.add(5,7) == 12)
- {
- return env->NewStringUTF(hello.c_str());
- }
- else
- {
- return env->NewStringUTF(hello1.c_str());
- }
- }
- Build command failed.
- Error while executing process /home/oncall/Desktop/Android/Sdk/cmake/3.6.4111459/bin/cmake with arguments {--build /home/oncall/Bha/MyApplication3/app/.externalNativeBuild/cmake/debug/x86_64 --target native-lib}
- ninja: error: '../../../../libadd.a', needed by '../../../../build/intermediates/cmake/debug/obj/x86_64/libnative-lib.so', missing and no known rule to make it
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement