[vtkusers] vtkStandardNewMacro Issue?
Alessandro
notinmyhead at gmail.com
Fri Sep 7 15:08:41 EDT 2012
I didn't understand. Do I need to write down something like that in the MyCustomInteractorStyle.cxx?
MyCustomInteractorStyle * MyCustomInteractorStyle::New() {
}
Ale
Il giorno 07/set/2012, alle ore 17:15, David Doria ha scritto:
> On Fri, Sep 7, 2012 at 11:02 AM, Alessandro <notinmyhead at gmail.com> wrote:
> Hello,
>
> I'm trying to develop a custom InteractoryStyle in a QT application, following the example: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Interaction/SelectAnActor
>
> 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?
>
> Thanks,
> Ale
>
> 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?
>
> David
More information about the vtkusers
mailing list