Swig C++ to Java UnsatisfiedLinkError -


I change C ++ in Java using swig I use G ++ to create and compile DLL

  big sigh -c ++ -java -package preprocessor Point.i g ++ -c -std = c ++ 11 point.cpp Point_wrap.cxx -ie:. \ ProgramFiles \ JDK \ included -ie: \ ProgramFiles \ JDK \ included \ Win32 G ++ Shared Room Point_wrap.o Point.o -o point.dll  

I do not have any errors While compiling and creating dll, when I generate the Java file and DLL on my project, I have an unbalanced link when I create a new object, it appears when I use Windows 8.1 x86 on the x64 version Everything works fine

  Exception in formula "AWT-EventQueue-0" java.lang.UnsatisfiedLinkErro R:. Preprocessor.PointClassJNI.new_Point__SWIG_0 () preprocessor.PointClassJNI.new_Point__SWIG_0 on J. (Native Method) preprocessor.Point & lt;. Init & gt; (Point.java:78) GUI.FileWorker.fileParser (at FileWorker.java45) GUI.MainWindow $ 2.actionPerformed at (MainWindow.java:139)  

This is what is Generates swig and where the error occurs when I make point = new point ();

  public point () {This (PointClassJNI.new_Point__SWIG_0 () is true); }  

Perhaps someone had this problem I would be very grateful for any help!

Finally I find the solution in this. Just need to add, -Wl-ed-stdcall-aka to my .bat file when I make dll

  big sip -c ++ -java -package preprocessor Point.i G ++ -c -std = C ++ 11 points.cpp Point_Rep.Cam -Ee: \ Program Files \ jdk \ include -EE: \ Program Files \ jdk \ include \ win32g ++ -shared point_wrap.o PointO.OW, --Ad-Stdick- Alias ​​-o point.dll  

rkapl, thanks for the response!


Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -