Build for TDLib Java example failed
- Followed the instructions for the build from here - https://tdlib.github.io/td/build.html?language=Java 2 . Followed instructions from here - https://github.com/tdlib/td/tree/master/example/java
- Used -A x64 on step above
- When I go to the second set of for lines instruction to build [After this you can compile the example source code:]
- Run cmake --build . --target install
Then the attached file with the error happens cmake.log
The error means that you are trying to link a debug DLL with a release DLL, which shouldn't happen if build instructions provided at https://tdlib.github.io/td/build.html?language=Java are used. It may help to run the build instructions in the new directory from scratch.
You don't need to use instructions from https://github.com/tdlib/td/tree/master/example/java if you use https://tdlib.github.io/td/build.html?language=Java.
Can you add this remark on the README.MD so the instructions become clearer?
Important points to make documentation better.
- Very confusing instructions about how to compile and no description about where the compiled artifacts are. There is a folder on description td/tdlib with dlls inside and org folder with many classes along its directory structure.
- libcrypto-3-x64
- libssl-3-x64
- tdjni
- zlib1
-
Is supposed to do a JNI configuration referencing this 4 dlls? If so, how to make it? It is unclear how to integrate the dlls using JNI so it can be added as dependency on any java project.
-
TDLib provides native Java interface through JNI. To enable it, specify option -DTD_ENABLE_JNI=ON to CMake.
Here https://tdlib.github.io/td/build.html?language=Java it already have this parameter. The instruction above can be misleading.
- Other insights Offer an example on how to use the lib using JNI to integrate on a Java project (Spring Boot + Gradle / Maven)