Re: [tcljava-user] TclBlend build problems using MSYS on WinNT
Brought to you by:
mdejong
|
From: Mo D. <md...@un...> - 2003-04-08 23:35:15
|
On Tue, 08 Apr 2003 15:29:53 -0600 rja...@nm... (Robert E. Jackson) wrote: > nm /c/jdk1.3.1_07/lib/jvm.lib | grep JNI_ -> > 00000000 I __imp__JNI_CreateJavaVM > 00000000 T _JNI_CreateJavaVM > 00000000 I __imp__JNI_GetCreatedJavaVMs > 00000000 T _JNI_GetCreatedJavaVMs > 00000000 I __imp__JNI_GetDefaultJavaVMInitArgs > 00000000 T _JNI_GetDefaultJavaVMInitArgs > > In the jvm.lib file I did notice > > _JNI_GetCreatedJavaVMs near jvm.dll > > But jvm.dll is <jvm>/jre/bin/classic which is in the PATH > but nowhere in the configure data. So, I don't see anything that is obviously wrong here. The .lib file should tell the runtime linker to pull in jvm.dll at runtime, but that has nothing to do with this problem. I remember reading this page about linking problems with gcc and JNI: http://www.inonit.com/cygwin/jni/invocationApi/archive.html Could you try downloading this .a file and trying to link with it instead of the JVM supplied jvm.lib? I thought gcc could handle this without special hand holding, but perhaps this is the problem. http://www.inonit.com/cygwin/jni/invocationApi/libjvm.dll.a Just create a .c file like the configure script does and then try to link it using the same command line args: % cat jni.c #include <jni.h> int main () { JNI_GetCreatedJavaVMs(NULL,0,NULL); return 0; } % cc -o jni.exe -g -O2 -I/c/jdk1.3.1_07/include -I/c/jdk1.3.1_07/include/win32 \ jni.c /c/jdk1.3.1_07/lib/jvm.lib And then try it with -L. -ljvm instead of the jvm.lib path after saving the libjvm.dll.a in the build dir. > Is cygwin messing up the path??? This has nothing to do with Cygwin. I don't think it is a path issue either. It is a compiler issue. Say, what was the URL for the JDK that you downloaded? I might be able to reproduce the error if on my system if I use the same JDK you used. Mo |