Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Creating *.dll in Visual Studio (using c++) for JNI

843829Apr 4 2008 — edited Apr 7 2008
Hi,
I'd like to ask, if anybody has experience how to make *.dll using Visual studio (2003) and use c++.

I make *.dll library in C ( in DEV-C++), it is no problem in C , but when I use C++, it doesnt work (it is the same in Visual studio)
I have the same code like in C ( the same header , and the "same" code - in dev-c++ it works well ) but when I try to create this same project using C++ it doesn work.
Visual studio throws exeption:

c:\Documents and Settings\patak\Dokumenty\Visual Studio Projects\jniknihovna\jniknihovna.cpp(13): error C2227: left of '->GetStringUTFChars' must point to class/struct/union
type is 'JNIEnv'
did you intend to use '.' instead?

c:\Documents and Settings\patak\Dokumenty\Visual Studio Projects\jniknihovna\jniknihovna.cpp(13): error C2819: type 'JNIEnv_' does not have an overloaded member 'operator ->'

Well does anybody have any idea how to solve this problem?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 5 2008
Added on Apr 4 2008
4 comments
740 views