[vtkusers] vtkStandardNewMacro Issue?
daviddoria at gmail.com
Fri Sep 7 11:15:29 EDT 2012
On Fri, Sep 7, 2012 at 11:02 AM, Alessandro <notinmyhead at gmail.com> wrote:
> I'm trying to develop a custom InteractoryStyle in a QT application,
> following the example:
> If I build my application up from a clean project, it appears to work
> properly. After few compilation, I get a linker error of duplication of
> MyCustomInteractorStyle::New() both in myapplication.o and main.o. Why?
You should have a MyCustomInteractorStyle.cxx where
this MyCustomInteractorStyle::New() appears so that it is made into its own
object (MyCustomInteractorStyle.o). Then this object should be linked to
everything else by the linker. Which file in your project does
the MyCustomInteractorStyle::New() appear in? And can you show us the
add_executable and target_link_libraries lines of your CMakeLists.txt?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vtkusers