Gradle cpp plugin doesn't link shared library

后端 未结 1 1521
暖寄归人
暖寄归人 2021-01-28 23:40

I have a C++ library to listen to radio with RF24. I wrap this library using JNI with a Java class.

The issue that I have is that gradle don\'t link the shared library

相关标签:
1条回答
  • 2021-01-29 00:27

    Use the following instead:

    cpp.lib library: 'rf24', linkage: 'shared'
    

    This induces a transitive dependency from libtransmission to librf24.

    It is not enough to put the files side by side to be found, however. You should either set LD_LIBRARY_PATH at runtime or compile libtransmission with a relative RPATH .

    0 讨论(0)
提交回复
热议问题