i am getting crazy tying to find out where or why is teh problem in the program I'm doing. If someone could help me, it would be great.
Ill explain you my problem:
i am doing some test to try out how the jni of javaworks. i implemented a dumy program which only purpose is to call a Frotran dll which has to show on the screen the typical Hello world. I did the C++ wrapper using the visual studio .net. Ive already accomplished the communication between the wrapper and Java. in a second stage I try to do the same but with the wrapper calling the fortran dll, and here is where the problems occur: the function called by the wrapper located in the fortran dll is not "found":
ReadValue error LNK2019: smbolo externo _PRINTER@0 sin resolver al que se hace referencia en la funcin "long __stdcall Java_ReadValue_getValue(struct JNIEnv_ *,class _jobject *)" (?Java_ReadValue_getValue@@YGJPAUJNIEnv_@@PAV_jobject@@@Z)
The Fortran code is as follows:INTEGER FUNCTION PRINTER()
!decs attributes c :: PRINTER
WRITE(6,'("-- FORTRAN funcion printer --")')
as you can observed is quite obvious.
So as the wrapper:
extern "C" __stdcall int PRINTER();
// i even try with : extern "C" __cdecl int PRINTER();
JNIEXPORT jint JNICALL Java_ReadValue_getValue(JNIEnv * env, jobject jobj)
printf("-- A ver si funciona la referencia --
int result = PRINTER();
printf(" -- valor de retorno ke leyo del archivo -- ",result);
Anyone can help me?? Thanks.