Home  >  Q&A  >  body text

c++ - .h文件里定义了一个类,怎么链接到so文件里?

A.h里定义了class B
C.cpp里include A.h并且引用了B类,声明B类B b;
G++ C.cpp -o X.so
为什么用JNI调用X.so运行时,错误提示找不到B类?

高洛峰高洛峰2764 days ago528

reply all(1)I'll reply

  • 巴扎黑

    巴扎黑2017-04-17 12:08:48

    You didn’t specify the header file search path. In fact, your header file was still not found

    reply
    0
  • Cancelreply