there are two issues i have that might have an impact on this.
1. the swig generated wrap code tries to redeclare long, and i get a compile error.
when i remove the following lines from JAI_wrap.cxx,
Code: Select all
/* Fix for jlong on some versions of gcc on Windows */
#if defined(__GNUC__) && !defined(__INTELC__)
typedef long long __int64;
#endif
2. [Edit: solved!, look at end of message] i am linking against jvm.dll (there is also a jvm.lib; i dont know hte difference, but i think it should be jvm.dll).
i use the latest stable release of the JDK (1.6.0_03) on windows (test system) and on linux (build system).
i mounted the jdk directory of the windows machine on my linux machine.
..so i link against the windows jvm with -ljvm.
in the code, i have to include jni.h, which includes jni_md.h, which is OS dependent. the dir structure is as folows:
jdk/include/jni.h
jdk/include/<os>/jni_md.h
(<os> is linux on linux, and win32 on the windows jdk)
when i use -I..../jdk/include/win32, i later get an error when linking:
Code: Select all
undefined reference to `__imp__JNI_GetCreatedJavaVMs@12'
undefined reference to `__imp__JNI_CreateJavaVM@12'
collect2: ld returned 1 exit status
linux/jni_md.h
Code: Select all
#ifndef _JAVASOFT_JNI_MD_H_
#define _JAVASOFT_JNI_MD_H_
#define JNIEXPORT
#define JNIIMPORT
#define JNICALL
typedef int jint;
#ifdef _LP64 /* 64-bit Solaris */
typedef long jlong;
#else
typedef long long jlong;
#endif
typedef signed char jbyte;
#endif /* !_JAVASOFT_JNI_MD_H_ */
Code: Select all
#ifndef _JAVASOFT_JNI_MD_H_
#define _JAVASOFT_JNI_MD_H_
#define JNIEXPORT __declspec(dllexport)
#define JNIIMPORT __declspec(dllimport)
#define JNICALL __stdcall
typedef long jint;
typedef __int64 jlong;
typedef signed char jbyte;
#endif /* !_JAVASOFT_JNI_MD_H_ */

2nd issue solved:
instead of -ljvm i just appended ...../jdk/lib/jvm.lib at the end of the linking command, and it linked successfully.
thought the FPUCW issue remains.