java windows does not compile dll
04041b opened this issue · comments
You could use
. .\build.ps1; Build-Library -BuildType "Release" -Arch "x64" -LangBinding "java"
to get the lib separately (for windows).
I use this way to get my lib but it still has some problem.
It would be not able to get our IPv4 and IPv6 addresses correctly (My test program returns me both 127.0.0.1
, and the return of native method are both
(empty))
By the way it could connect to the virtural network, and MAC
, nodeID
are correct, which seems to be wried.
Maybe it would be useful for you.
You could use
. .\build.ps1; Build-Library -BuildType "Release" -Arch "x64" -LangBinding "java"
to get the lib separately (for windows).I use this way to get my lib but it still has some problem. It would be not able to get our IPv4 and IPv6 addresses correctly (My test program returns me both
127.0.0.1
, and the return of native method are both(empty)) By the way it could connect to the virtural network, and
MAC
,nodeID
are correct, which seems to be wried.Maybe it would be useful for you.
Thank you, but I'm looking for a dll file I can import in my java program.
using the command . .\build.ps1; Build-Host -BuildType "Release" -Arch "x64"
yields you a libzt.dll and libzt.lib, but the dll file just don't work
If you can reproduce the results of my test in #277, please reply, thank you
It works!!!
All I change is from s_addr to S_addr in #277 and the nlohmann/json fix in #263
Here's the step I made it work
Apply the fix above, my fork with the fix: https://github.com/04041b/libzt
clone it, and git submodule update --init
run ./build.sh host-jar
in git bash and . .\build.ps1; Build-Library -BuildType "Release" -Arch "x64" -LangBinding "java"
in powershell
copy dist\win-x64-jni-release\lib\libzt.dll and rename it to zt.dll
copy dist-x64-jar-release\pkg\libzt-1.8.10.jar to your project
let me know if this works for you
They are just the same.
@04041b
just in case anyone stumble on this issue I'm going to leave it open until the issue is fixed with scripts
#267 (comment)
Maybe we could fix the jar documents. This problem has stuck me for years from using the lib.
The thing is I have no idea with the change in JavaSockets.cxx because I don't know c++. The change is a required fix to build. I don't want to have a pull request that contains changes I don't even know.
Maybe we could fix the jar documents. This problem has stuck me for years from using the lib.
Maybe giving suggestions in if
would be a good way. These if
could be useful for others using this project.
Maybe giving suggestions in
if
would be a good way. Theseif
could be useful for others using this project.
i don't quite understand what you mean by "if"