<div class="gmail_quote">On Fri, Sep 7, 2012 at 11:02 AM, Alessandro <span dir="ltr">&lt;<a href="mailto:notinmyhead@gmail.com" target="_blank">notinmyhead@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
<br>
I&#39;m trying to develop a custom InteractoryStyle in a QT application, following the example: <a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/Interaction/SelectAnActor" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/Cxx/Interaction/SelectAnActor</a><br>

<br>
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?<br>
<br>
Thanks,<br>
Ale<br></blockquote><div><br></div>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?</div>
<div class="gmail_quote"><br>David</div>