For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings


Need to speed up your development?
Have a look at our:

Samples & Tools


Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

'AddDriver' : cannot convert paramete

Rui Fortes's picture

Hello again.

I derived "FDriver_Line" class from "TFunction_Driver".

I also used the macros to define the Handle to that class as demonstrated "How to define an handled object without CDL?" in the FAQs.

When I call the addriver method in I get a convertion error:

TFunction_DriverTable::Get()->AddDriver(Standard_GUID("myLineDriver"), myLineDriver );

I get the error:

'AddDriver' : cannot convert parameter 2 from 'class Handle_FDriver_Line' to 'const class Handle_TFunction_Driver &'

If I declare "myLineDriver" as a pointer:

FDriver_Line *myLineDriver = new FDriver_Line();

It runs Ok.

I guess this is a problem with the way I defined the Handle but I did exactly as the FAQs.

Please can anyone help me.