Hi! In advance sorry for my english, it's not native language for me.
I try create work project with native CPP classes. And i make this,but...if i create only inherited objects - all is ok, but if I also create other native objects, a have error:
Java Result: -1073741819
My CPP code:
class TEST_API TestClass { public: TestClass(); ~TestClass(); void PrintText(string text); void PrintString(); int GetInt(); void SetInt(int val); const char* GetString(); char* GetCharPtr(); const wchar_t* GetWString(); wchar_t* GetWCharPtr(); void SetString(string str); void SetCharPtr(char* characters); void SetWString(wstring wstr); void SetWCharPtr(wchar_t* wide_characters); protected: int mInt; string mString; char* mCharPtr; wstring mWString; wchar_t* mWCharPtr; }; class TEST_API BasedClass { public: BasedClass(); ~BasedClass(); void CommonMethod(); void CommonMethod2(); protected: int mA; }; class TEST_API InheritsClass : public BasedClass { InheritsClass(); ~InheritsClass(); };
Horewer,with declarations.
Java code:
@Library("TestDLL") @Runtime(CPPRuntime.class) public class TestClass extends CPPObject { public TestClass() { super(); } //... } public class InheritsClass extends BasedClass { public InheritsClass() { super(); } public InheritsClass(Pointer pointer) { super(pointer); } }; @Library("TestDLL") @Runtime(CPPRuntime.class) public class BasedClass extends CPPObject { public BasedClass() { super(); } public BasedClass(Pointer pointer) { super(pointer); } native public void CommonMethod(); native public void CommonMethod2(); };
main function:
// inherit test InheritsClass _inheritClass = new InheritsClass(); _inheritClass.CommonMethod(); // class test #1 TestClass testClass = new TestClass();
where the error?
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4