Deriving a D-class from a CPP-class

Alain De Vos devosalain at ymail.com
Wed Apr 28 19:46:00 UTC 2021


Following code produces a linker error.
d: error: undefined symbol: wxApp::OnInit()
```
extern(C++)
	{class wxApp {
			public:
			bool OnInit();
			//virtual bool Oninit();
		}
	}

class MYAPP: wxApp {
			alias OnInit=wxApp.OnInit;
			bool OnInit(){return true;};
}

int main(){
	return 0;
}
```
It is rather clear what I want to achieve but virtual functions 
give me headache because dlang does not now the word virtual.


More information about the Digitalmars-d-learn mailing list