Hi Klesk, For an opaque object, you'll need a creator and destructor function for SampleClass. class SampleClass; extern SampleClass* CreateSampleClass(); extern void DestroySampleClass(SampleClass*); Then you'll be able to do: SampleClass* object = CreateSampleClass(); Sincerely, --Eljay ________________________________________ From: gcc-help-owner@xxxxxxxxxxx [gcc-help-owner@xxxxxxxxxxx] On Behalf Of Klesk [kleskmail@xxxxxxxxx] Sent: Saturday, August 01, 2009 4:11 AM To: gcc-help@xxxxxxxxxxx Subject: How to add a class to the tree Let's say I have code like this: SampleClass object; which of course fails to compile because there is no SampleClass. How to programmically create a class named SampleClass to make it possible to complie ? -- Klesk