I studied Java , there was a topic about JNI (little written). I liked the essence, I decided to try it, I searched for a long time in google , I didn’t find anything (or I can’t say I did not understand). There is such a java code:
public class Main{ static{ System.loadLibrary("lib.dll"); } public static void main(String args[]){ printString("TEST!\n") } } C ++ wanted to write such a method
void printString(string str){ std::cout << str; } How to compile in dll and write this method?