Differences in Visual Studio vs OpenJDK compiles - jchar vs OLECHAR

Pete Brunet pete at a11ysoft.com
Tue Jun 8 04:12:01 UTC 2010

I resolved this by disabling the Zc:wchar_t-  option in Visual Studio. 
>From the GUI I had set this via the file's property page:
  C++, Language settings, Treat wchar_t as Built-in Type, Yes
which is the default and which also matches the state of that option for
the OpenJDK build.  I had set that to fix some other problem but
fortunately no longer need it.

Pete Brunet wrote:
> I'm working on a new file for OpenJDK.  I get no compile errors in my
> Visual Studio IDE environment but interestingly enough get a set of
> problems all like this one in the OpenJDK environment:
> Source:
> const jchar* jcstr = env->GetStringCritical(name, NULL);
> *pszName = ::SysAllocStringLen(jcstr, env->GetStringLength(name));
> Compile error:
> error C2664: 'SysAllocStringLen' : cannot convert parameter 1 from
> 'const jchar *' to 'const OLECHAR *'
> I tried changing the warning levels in VS with no difference.
> I could cast the problem away but I'd like to understand what's
> causing the problem so my VS environment is equivalent to the OpenJDK
> build environment.
> Has anyone else encountered this before?
> Thanks, Pete
> -- 
> *Pete Brunet*
> a11ysoft - Accessibility Architecture and Development
> (512) 238-6967 (work), (512) 689-4155 (cell)
> Skype: pete.brunet
> IM: ptbrunet (AOL, Google), ptbrunet at live.com (MSN)
> http://www.a11ysoft.com/about/
> Ionosphere: WS4G
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/build-dev/attachments/20100607/2385a674/attachment.html>

More information about the build-dev mailing list