I am trying to create a dll to use with the Java JNI. I am using the g++ =
gnu compiler. The command is
gcc -Wall -D_JNI_IMPLEMENTATION_ -Wl,--kill-at =
-Ic:/j2sdk1.4.1_02/include -
Ic:/j2sdk1.4.1_02/include/win32 -shared app.c -o app.dll
. I have got the hello world version working. I now need to add some =
calls to directX. I am getting the error message 'undefined reference to =
DirectDrawCreate@12'. When I had this error message before, when =
compiling to app.exe, I was able to solve the problem by linking to a =
file provided by Dev-C++ for the purpose - namely d3dx8d.dll.
I am hoping that this file will solve the problem when creating my dll, =
but I don't know how to add it to the command above. I have tried =
-ld3dx8d.dll and -d3dx8d.dll, but, of course, they don't work. Please =
help.
Thanks in anticipation.
PS I would love to be using the Dev-C++ SDK to create this dll, but I've =
spent a week on that and I can't get it to work. ( If I tell it the =
project is to make a dll, it does something very complicated which =
appears to be nothing to do with what I am trying to acheive. ) If =
anyone knows the trick I would be grateful.
Andrew
|