Hi, i did correctly the sun tutorial http://java.sun.com/docs/books/tutorial/native1.1/stepbystep/
I made an project in dev i called hello
I changed the Porjectoption and added
the jni.h dir and the other one in win32.
i changed in projectoption to create dll.
i get follwing output
Finding dependencies for file: C:\jdk1.2.2\bin\HelloWorldImp.c
Fhrt make... aus
make.exe -f "C:\jdk1.2.2\bin\Makefile.win" all
dllwrap.exe --output-def libnative.def --driver-name c++ --implib libnative.a HelloWorldImp.o -o hello.dll -L"C:\DEV-CPP\lib"
C:\DEV-CPP\BIN\DLLWRAP.EXE: no export definition file provided
C:\DEV-CPP\BIN\DLLWRAP.EXE: creating one, but that may not be what you want
Ausfhrung beendet
Kompilierung erfolgreich
but this doesn't work
i get an error from the java
Exception in thread "main" java.lang.UnsatisfiedLinkError: displayHelloWorld
i thnik the dll is not working correct
Has anybody an idea what goes wrong ?
the vc++ compiler line for the dll is
cl -Ic:\java\iclude -Ic:\java\include\win32
-LD HelloWorldImp.c -Fehello.dll
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, i did correctly the sun tutorial
http://java.sun.com/docs/books/tutorial/native1.1/stepbystep/
I made an project in dev i called hello
I changed the Porjectoption and added
the jni.h dir and the other one in win32.
i changed in projectoption to create dll.
i get follwing output
Finding dependencies for file: C:\jdk1.2.2\bin\HelloWorldImp.c
Fhrt make... aus
make.exe -f "C:\jdk1.2.2\bin\Makefile.win" all
dllwrap.exe --output-def libnative.def --driver-name c++ --implib libnative.a HelloWorldImp.o -o hello.dll -L"C:\DEV-CPP\lib"
C:\DEV-CPP\BIN\DLLWRAP.EXE: no export definition file provided
C:\DEV-CPP\BIN\DLLWRAP.EXE: creating one, but that may not be what you want
Ausfhrung beendet
Kompilierung erfolgreich
but this doesn't work
i get an error from the java
Exception in thread "main" java.lang.UnsatisfiedLinkError: displayHelloWorld
i thnik the dll is not working correct
Has anybody an idea what goes wrong ?
the vc++ compiler line for the dll is
cl -Ic:\java\iclude -Ic:\java\include\win32
-LD HelloWorldImp.c -Fehello.dll