From: Luke Dunstan <coder_infidel@ho...> - 2002-12-13 10:27:16
My guess would be to use the "-Wl,--kill-at" option when linking the DLL
that has stdcall functions.
>From: Céline PLOUVIER <cplouvier@...>
>Subject: [Mingw-users] Dll and JNI compilation order problem
>Date: Fri, 13 Dec 2002 08:59:35 +0100
>I want to compil a source code in a dll and then to create the jni dll in
>order to call the dll with java.
>The source code contains the words __declspec(dllexport)...
>I use the following command to create the dll:
>gcc -fpic -I "c:\mingw\include" -o "c:\myPath\file.obj" -c
>gcc -shared -L "c:\mingw\lib" -o "c:\myPath\file.dll" "c:\myPath\file.obj"
>gcc -fpic -I "c:\mingw\include" -I "c:\jdk\include\win32" -I
>"c:\jdk\include" -o "c:\myPath\fileJni.obj" -c "c:\myPath\fileJni.c"
>gcc -shared -L "c:\mingw\lib" -o "c:\myPath\fileJni.dll"
>The compilation works, but I am not able to call the function with java (it
>works with lcc and an other compiler).
>When i look for description of the created dll, i have the name of the
>functions in file.dll but i have the name of the function with @ and a
>number for the fileJni.dll .
>Does someone have an explanation ?
Tired of spam? Get advanced junk mail protection with MSN 8.