Building 64-bit C++ app on AMD & Windows 64-bit using vs2005

I've looked around the Developer Forums (et al) and I think this is the appropriate place for this question/subject. If not please let me know another place.

I'm porting a c++ app from 32-bit to 64-bit that relies on some java code for doing db access. The c++ app uses jni and for various reasons I'm using micro$oft's vs2005. In their infinite wisdom, ms compiler folks decided that a long is 32-bit; a size_t is 64-bit; and long long is 64-bit (they also have __int64 as a 64-bit type too) (Note: Most compilers configure long's to be 64-bit).

In the jni, jsize is a jint which is a long (native); and a jlong is an __int64 (native).

This obviously won't work for large objects (e.g., an array > 2G elements). One recourse (besides going to gnu) is to change the typedef for jint. Does anyone have any other ideas (or am I missing something)?

tia.

[891 byte] By [codewarrior22a] at [2007-11-26 19:54:48]
# 1
What do you mean by a "large object"? As in java? You can't have a java array that is that large.
jschella at 2007-7-9 22:47:28 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 2
I see (now). In my naivete (being a c++ developer) I thought 64-bit java supported 64-bit arrays. Amazing (for lack of a better word). Thanks a lot for the info.
codewarrior22a at 2007-7-9 22:47:28 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 3

> I've looked around the Developer Forums (et al) and I

> think this is the appropriate place for this

> question/subject. If not please let me know another

> place.

Welcome to our forum on www.Viva64.com:

http://www.Viva64.com/forum/

This forum is in use for all 64-bit developers. Discussions about 64 bit programming problems for all languages and for all platforms.

Viva64a at 2007-7-9 22:47:28 > top of Java-index,Java HotSpot Virtual Machine,Specifications...