Quantcast

how to load cpp dll from micro manager

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

how to load cpp dll from micro manager

luchangli1993

Dear all,

       I’m developing a plugin that can process image by GPU. in the first step, I wrote some cpp functions and compiled them to dll by VS2013 with JNI. I also wrote a class library CPPToJava to declare these funtions. I load the dll by System.loadLibrary ("CPPToJavaLib"); and called the functions in the plugin entry method to have a try.

       I copied the dll to the folder C:\Program Files\Micro-Manager-2.0beta and the root folder of my project, when I debug my plugin in netbeans, the cpp funtions works well. But when I directly open micro-manager, the micro-manager can’t execute my cpp funtions and load my plugin. I tried to copy the dll to other folder such as C:\Windows, it’s also not working.

 

Do you know how to solve it?

 

Thank you very much and best wishes.

 
2017-01-24

Wish you happy everyday!*^_^* 
 
Luchang Li
Doctorial student
Britton Chance Center for Biomedical Photonics
Wuhan National Laboratory for Optoelectronics (WNLO)
Huazhong University of Science and Technology
1037 Luoyu Road WNLO G201, Wuhan 430074, P. R. China
 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: how to load cpp dll from micro manager

luchangli1993
Thanks everybody,
I have solved this problem.  I directly declare the cpp functions in my plugin class (when compiled by cmd javac, javah, remove all other declaretion other than the cpp functions in the class), and do not write a dedicated class to declare it, then copy the dll to micro-manager folder, the micro-manager can load the dll successfully.
 
 
2017-01-24
Wish you happy everyday!*^_^* 
 
 Luchang Li
Doctorial student
Britton Chance Center for Biomedical Photonics
Wuhan National Laboratory for Optoelectronics (WNLO)
Huazhong University of Science and Technology
1037 Luoyu Road WNLO G201, Wuhan 430074, P. R. China

发件人:"luchangli1993"<[hidden email]>
发送时间:2017-01-24 09:42
主题:[micro-manager-general] how to load cpp dll from micro manager
收件人:"Micro-Manager General"<[hidden email]>
抄送:
 

Dear all,

       I’m developing a plugin that can process image by GPU. in the first step, I wrote some cpp functions and compiled them to dll by VS2013 with JNI. I also wrote a class library CPPToJava to declare these funtions. I load the dll by System.loadLibrary ("CPPToJavaLib"); and called the functions in the plugin entry method to have a try.

       I copied the dll to the folder C:\Program Files\Micro-Manager-2.0beta and the root folder of my project, when I debug my plugin in netbeans, the cpp funtions works well. But when I directly open micro-manager, the micro-manager can’t execute my cpp funtions and load my plugin. I tried to copy the dll to other folder such as C:\Windows, it’s also not working.

 

Do you know how to solve it?

 

Thank you very much and best wishes.

 
2017-01-24

Wish you happy everyday!*^_^* 
 
Luchang Li
Doctorial student
Britton Chance Center for Biomedical Photonics
Wuhan National Laboratory for Optoelectronics (WNLO)
Huazhong University of Science and Technology
1037 Luoyu Road WNLO G201, Wuhan 430074, P. R. China
 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Loading...