Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

binding to windows dll #11

Open
anotherche opened this issue Dec 12, 2017 · 0 comments
Open

binding to windows dll #11

anotherche opened this issue Dec 12, 2017 · 0 comments

Comments

@anotherche
Copy link

Hi,

First of all, I have successfully used gphoto2-java to make a GUI for time-lapse capture working on Linux platform. Thank you!
Next, I wanted to make the same for Windows. Native dlls were built using MSYS2 mingw64 environment Windows port - few questions #97. So, long story short, I could not use those dlls with gphoto2-java.

I tried to account for all requirements:
both jre and dll are 64 bit;
all dependencies (a number of dlls required by gphot2.dll) are collected in one folder and jna.library.path set to this folder;
jna.debug_load=true reports that the library is found in the path specified by jna.library.path.
The error log: hs_err_pid1524.log
Additionally, I tried to import the library in c# code. I have checked only gp_library_version function. No success. HRESULT: 0x8007007E (dll not found exception), although all the dependencies are located in the folder with the exe.
But, at the same time, I succeed when I use the library dynamically loaded in a simple c++ program with all conditions the same: all dependencies are placed in the folder with .exe. The .exe is built as 64 bit application to correspond to the 64-bit dlls. Again, I have checked only gp_library_version function, and it returned the strings with the library info, as it should. So, the windows port of the library seem to work normally.
It seems that both c# and Java can not use this windows port because of some problems with loading functions from dlls dependent by the library. What can be done?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant