I'm trying to call a function from it from a function in another
object.
here is the struct....
Expand|Select|Wrap|Line Numbers
- struct JNI_Interface
- {
- JavaVM *jvm; /* denotes a Java VM */
- JNIEnv *env; /* pointer to native method interface */
- //static jobject phone_obj; // phone object to make JNI calls to PTF
- with
- int jni_startJVM();
- int jni_checkException(char* jni_call) const;
- int jni_startCom() const;
- };
Expand|Select|Wrap|Line Numbers
- JNI_Interface::jni_startCom() const
- {
- const char* phone_class_name = "phonetest/phone/synergy/SynergyPhone";
- // class of phone to use
- .....
- }
Expand|Select|Wrap|Line Numbers
- in mobilePhone class...
- private:
- JNI_Interface ptfPhone;
- mobilePhone::com_startCom()
- {
- // Added for JNI interface with PTF
- if(comPort == "PTF")
- {
- int teh_test = ptfPhone.jni_startCom(); // for testing
- return 0;
- }
[error]
error C2662: 'JNI_Interface::jni_startCom' : cannot convert 'this'
pointer from 'JNI_Interface' to 'const JNI_Interface &'
[/error]
all the other online research I've done told me that if I changed these
functions to const that would fix this issue, but it still remains.
Any ideas?