Advertisement
Guest User

Untitled

a guest
Jul 17th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. **target_link_libraries(
  2. native-lib
  3. ${log-lib}
  4. ${CMAKE_SOURCE_DIR}/libadd.a)**
  5.  
  6. #include <jni.h>
  7. #include <string>
  8. #include "../../../staticLib/files/add.hpp"
  9.  
  10. extern "C" JNIEXPORT jstring JNICALL
  11. Java_com_example_oncall_myapplication_MainActivity_stringFromJNI(
  12. JNIEnv* env,
  13. jobject /* this */) {
  14. std::string hello = "Hello SUCESSS its 12";
  15.  
  16. std::string hello1 = "Hello FAILED it is not 12";
  17.  
  18. addition::my::work::abc Obj;
  19. Obj.add(5,7);
  20.  
  21. if(Obj.add(5,7) == 12)
  22. {
  23. return env->NewStringUTF(hello.c_str());
  24. }
  25. else
  26. {
  27. return env->NewStringUTF(hello1.c_str());
  28. }
  29.  
  30. }
  31.  
  32. Build command failed.
  33. 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}
  34.  
  35. 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