Is there an option to create a shared library for Java applications? #63

issue fatefree openend this issue on September 16, 2014
  1. fatefree commented at 10:26 pm on September 16, 2014: none
    It seems there used to be a make target to create a shared library for native use in Bitcoinj (make libjavasecp256k1.so) some time ago, but the latest repo seems to only create a static library. Is there a way to create a shared library that can be used for Java applications?
  2. sipa commented at 0:18 am on September 17, 2014: contributor
    @theuni We have a Java JNI wrapper in the source tree, but I doubt the build system supports it?
  3. theuni commented at 6:49 am on September 17, 2014: contributor

    @sipa It’s not included now, but I don’t know of any real blocker for it other than locating the jni headers. My only real experience with jni is Android… is there a “typical” way of locating jni headers other than what’s supported by your sdk/ndk/ide?

    I’ll look into it tomorrow.

  4. fatefree commented at 12:45 pm on September 17, 2014: none
    I believe they are in JAVA_HOME/include and JAVA_HOME/include/linux or /win32. Thanks very much for your help!
  5. fatefree commented at 6:43 pm on September 20, 2014: none

    @theuni Is there any way to modify the original make target to work with the new library as a makeshift solution? Unfortunately I’ve been unable to do so myself, but I am also out of my depth here. Here is the original target:

    libjavasecp256k1.so: $(OBJS) obj/secp256k1.o $(JAVA_FILES) $(CC) -fPIC -std=$(STD) $(CFLAGS) $(CFLAGS_EXTRA) -DNDEBUG -$(OPTLEVEL) -I. src/java/org_bitcoin_NativeSecp256k1.c $(LDFLAGS_EXTRA) $(OBJS) obj/secp256k1.o -shared -o libjavasecp256k1.so

  6. theuni commented at 8:47 pm on September 21, 2014: contributor
    See #64
  7. sipa commented at 5:18 am on November 28, 2016: contributor
    Fixed by #364.
  8. sipa closed this on Nov 28, 2016

  9. real-or-random referenced this in commit 9ecd8bf38a on May 31, 2019

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/secp256k1. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-10-30 05:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me