Deriving a D-class from a CPP-class

Adam D. Ruppe destructionator at gmail.com
Wed Apr 28 20:06:06 UTC 2021


On Wednesday, 28 April 2021 at 19:46:00 UTC, Alain De Vos wrote:
> Following code produces a linker error.
> d: error: undefined symbol: wxApp::OnInit()
> ```
> extern(C++)
> 	{class wxApp {
> 			public:
> 			bool OnInit();
> 			//virtual bool Oninit();

you mean `abstract` for that one?


> 			alias OnInit=wxApp.OnInit;

idk what you intend to do with this, this pattern is for merging 
overloads not overriding

> 			bool OnInit(){return true;};

and you might want `override` there



More information about the Digitalmars-d-learn mailing list