
Fri, 05/07/2010 - 20:53
Forums:
Hello everybody,
I implemented Handles via the Standard_DefineHandle.hxx macros as described in Romans blog [ http://opencascade.blogspot.com/2008/11/open-cascade-handles-lets-handle... ]. Now I encounter the following problem: I have two classes from which one includes the other. The definition of class A uses the DefineHandle macros. That is, classA.hxx is included in classA.cxx and in classB.hxx which causes the linker to exit with an "multiple definition of" error.
How can I overcome this error? How can I link these classes into one shared library?
I attached an simple classA-classB-example.
Thanks in advance,
Dennis
Mon, 05/10/2010 - 13:24
Hi Dennis,
try to move the IMPLEMENT_ statement from the .hxx file into the corresponding .cxx file
Mon, 05/10/2010 - 13:54
It worked!
Thank you Etienne.