[vtkusers] Linker problem

Bill Lorensen bill.lorensen at gmail.com
Sat Aug 15 14:04:06 EDT 2015


Please keep the list cc'ed.

I do not recommend putting your code in the VTK source tree.

That said, I recently added a Remote Module capability to VTK. If your
code is not an app, but rather a new vtk module, this will be useful.
'm not sure what release will contain it, but the current vtk git repo
has it. See
http://www.vtk.org/Wiki/VTK/Remote_Modules

Bill

On Sat, Aug 15, 2015 at 1:18 PM, Marc Jaspar <mjjmarc at outlook.com> wrote:
> Thanks again.
>
> No I am building the application in new VTK directories that I have created.
> The raw data in a Source data directory and the compiled code into the VTK/Debug directory.
>
> Since your first instinct was the cmake, I am re-installing the complete VTK ensuring all the required flags are set.
>
> I will before compiling, use the mentioned example from your examples.
>
> Thanks for the help and, I really enjoyed both your publications.
>
>
> Marc
>
> ________________________________________
> From: Bill Lorensen <bill.lorensen at gmail.com>
> Sent: August 15, 2015 12:42 PM
> To: Marc Jaspar; VTK Users
> Subject: Re: [vtkusers] Linker problem
>
> Please keep the list cc'ed.
>
> Are you building this example outside of the vtk source tree. To build
> a single example, you don't need such a complicated CMakeLists.txt
>
> Start simple with an example like this:
> http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/Cone
>
>
>
> On Sat, Aug 15, 2015 at 12:03 PM, Marc Jaspar <mjjmarc at outlook.com> wrote:
>> Thanks for the response.  It's extensive but here it is:
>>
>> set(Module_SRCS
>>   vtkAbstractMapper3D.cxx
>>   vtkAbstractMapper.cxx
>>   vtkAbstractPicker.cxx
>>   vtkAbstractVolumeMapper.cxx
>>   vtkActor2DCollection.cxx
>>   vtkActor2D.cxx
>>   vtkActorCollection.cxx
>>   vtkActor.cxx
>>   vtkAssembly.cxx
>>   vtkBackgroundColorMonitor.cxx
>>   vtkCameraActor.cxx
>>   vtkCamera.cxx
>>   vtkCameraInterpolator.cxx
>>   vtkCellCenterDepthSort.cxx
>>   vtkColorTransferFunction.cxx
>>   vtkCompositeDataDisplayAttributes.cxx
>>   vtkCompositePolyDataMapper.cxx
>>   vtkCoordinate.cxx
>>   vtkCullerCollection.cxx
>>   vtkCuller.cxx
>>   vtkDataSetMapper.cxx
>>   vtkDiscretizableColorTransferFunction.cxx
>>   vtkDistanceToCamera.cxx
>>   vtkFollower.cxx
>>   vtkFrustumCoverageCuller.cxx
>>   vtkGenericRenderWindowInteractor.cxx
>>   vtkGenericVertexAttributeMapping.cxx
>>   vtkGlyph3DMapper.cxx
>>   vtkGPUInfo.cxx
>>   vtkGPUInfoList.cxx
>>   vtkGraphicsFactory.cxx
>>   vtkGraphMapper.cxx
>>   vtkGraphToGlyphs.cxx
>>   vtkHardwareSelector.cxx
>>   vtkHierarchicalPolyDataMapper.cxx
>>   vtkImageActor.cxx
>>   vtkImageMapper3D.cxx
>>   vtkImageMapper.cxx
>>   vtkImageProperty.cxx
>>   vtkImageSlice.cxx
>>   vtkImageSliceMapper.cxx
>>   vtkInteractorEventRecorder.cxx
>>   vtkInteractorObserver.cxx
>>   vtkLabeledContourMapper.cxx
>>   vtkLightActor.cxx
>>   vtkLightCollection.cxx
>>   vtkLight.cxx
>>   vtkLightKit.cxx
>>   vtkLogLookupTable.cxx
>>   vtkLookupTableWithEnabling.cxx
>>   vtkMapArrayValues.cxx
>>   vtkMapper2D.cxx
>>   vtkMapperCollection.cxx
>>   vtkMapper.cxx
>>   vtkObserverMediator.cxx
>>   vtkPolyDataMapper2D.cxx
>>   vtkPolyDataMapper.cxx
>>   vtkProp3DCollection.cxx
>>   vtkProp3D.cxx
>>   vtkProp3DFollower.cxx
>>   vtkPropAssembly.cxx
>>   vtkPropCollection.cxx
>>   vtkProp.cxx
>>   vtkProperty2D.cxx
>>   vtkProperty.cxx
>>   vtkRendererCollection.cxx
>>   vtkRenderer.cxx
>>   vtkRendererDelegate.cxx
>>   vtkRendererSource.cxx
>>   vtkRenderWindowCollection.cxx
>>   vtkRenderWindow.cxx
>>   vtkRenderWindowInteractor.cxx
>>   vtkSelectVisiblePoints.cxx
>>   vtkShaderDeviceAdapter2.cxx
>>   vtkTextActor.cxx
>>   vtkTextActor3D.cxx
>>   vtkTexture.cxx
>>   vtkTexturedActor2D.cxx
>>   vtkTransformCoordinateSystems.cxx
>>   vtkTransformInterpolator.cxx
>>   vtkTupleInterpolator.cxx
>>   vtkViewDependentErrorMetric.cxx
>>   vtkViewport.cxx
>>   vtkVisibilitySort.cxx
>>   vtkVolumeCollection.cxx
>>   vtkVolume.cxx
>>   vtkVolumeProperty.cxx
>>   vtkWindowLevelLookupTable.cxx
>>   vtkWindowToImageFilter.cxx
>>
>>   vtkAssemblyNode.cxx # Needed by vtkAssembly
>>   vtkAssemblyPath.cxx # Needed by vtkAssembly
>>   vtkAssemblyPaths.cxx # Needed by vtkAssembly
>>
>>   vtkAreaPicker.cxx # Needed by vtkRenderer
>>   vtkPicker.cxx # Needed by vtkRenderer
>>   vtkAbstractPropPicker.cxx # Needed by vtkAreaPicker
>>   vtkPropPicker.cxx # Needed by vtkRenderWindowInteractor
>>   vtkPickingManager.cxx # Needed by vtkRenderWindowInteractor
>>   vtkLODProp3D.cxx # Needed by vtkAreaPicker
>>   vtkWorldPointPicker.cxx # Needed by vtkPropPicker
>>
>>   # Needed for the InteractorStyleSwitch...
>>   vtkCellPicker.cxx
>>   vtkPointPicker.cxx
>>   vtkRenderedAreaPicker.cxx
>>   vtkScenePicker.cxx
>>
>>   # Needed by vtkRenderWindowInteractor, for the default interactor.
>>   vtkInteractorStyle.cxx
>>   vtkInteractorStyleSwitchBase.cxx
>>   # vtkTDx stuff dragged in by vtkInteractorStyle
>>   vtkTDxInteractorStyle.cxx
>>   vtkTDxInteractorStyleCamera.cxx
>>   vtkTDxInteractorStyleSettings.cxx
>>
>>   vtkStringToImage.cxx
>>   vtkTextMapper.cxx
>>   vtkTextProperty.cxx
>>   vtkTextPropertyCollection.cxx
>>   vtkTextRenderer.cxx
>>
>>   # Some of the new rendering code - may move around in the future.
>>   vtkAbstractInteractionDevice.cxx
>>   vtkAbstractRenderDevice.cxx
>>   vtkRenderWidget.cxx
>>   )
>>
>> if(VTK_RENDERING_BACKEND STREQUAL "OpenGL2")
>>   set_source_files_properties(
>>     vtkRenderWindow.cxx  # dummy out painterdevice adapter
>>     vtkHardwareSelector.cxx # dummy out painter device adapter
>>     PROPERTIES COMPILE_FLAGS -DVTK_OPENGL2)
>>   list(APPEND Module_SRCS
>>     vtkPointGaussianMapper.cxx
>>     )
>>   set_source_files_properties(
>>     vtkPointGaussianMapper
>>     ABSTRACT
>>     )
>> else() # Add painter device adapter when not OpenGL2
>>   list(APPEND Module_SRCS
>>     vtkPainterDeviceAdapter.cxx
>>     )
>> endif()
>>
>> set(${vtk-module}_HDRS
>>   vtkGPUInfoListArray.h
>>   vtkNoise200x200.h
>>   vtkPythagoreanQuadruples.h
>>   vtkRayCastStructures.h
>>   vtkRenderingCoreEnums.h
>>   vtkTDxMotionEventInfo.h
>>   )
>>
>> set_source_files_properties(
>>   vtkAbstractInteractionDevice
>>   vtkAbstractMapper3D
>>   vtkAbstractMapper
>>   vtkAbstractRenderDevice
>>   vtkAbstractVolumeMapper
>>   vtkAbstractPicker
>>   vtkAbstractPropPicker
>>   vtkCuller
>>   vtkGPUInfoList.cxx
>>   vtkHardwareSelector
>>   vtkImageMapper3D
>>   vtkInteractorObserver
>>   vtkMapper
>>   vtkMapper2D
>>   vtkProp
>>   vtkProp3D
>>   vtkRendererDelegate
>>   vtkShader
>>   vtkShaderDeviceAdapter
>>   vtkShaderDeviceAdapter2
>>   vtkShaderProgram
>>   vtkTextRenderer
>>   vtkTDxInteractorStyle
>>   vtkViewport
>>   vtkVisibilitySort
>>   vtkStringToImage
>>   ABSTRACT
>>   )
>>
>> set_source_files_properties(
>>   vtkAbstractInteractionDevice
>>   vtkAbstractRenderDevice
>>   vtkRenderWidget
>>   WRAP_EXCLUDE
>>   )
>>
>> # On OS X, vtkRenderWindowJava must be compiled with Objective C++
>> if(APPLE)
>>   set_source_files_properties(
>>     vtkRenderWindow.cxx
>>     PROPERTIES WRAP_JAVA_OBJC 1
>>   )
>> endif()
>>
>> vtk_module_library(vtkRenderingCore ${Module_SRCS})
>>
>>
>> ________________________________________
>> From: Bill Lorensen <bill.lorensen at gmail.com>
>> Sent: August 15, 2015 11:57 AM
>> To: Marc Jaspar
>> Cc: vtkusers at vtk.org
>> Subject: Re: [vtkusers] Linker problem
>>
>> What does your CMakeLists.txt file look like?
>>
>>
>> On Sat, Aug 15, 2015 at 11:44 AM, Marc Jaspar <mjjmarc at outlook.com> wrote:
>>> I have just upgraded to the new VTK version 6.2.0 and, I am getting an error
>>> which never happened previously.
>>>
>>> I am starting by creating the vtkCone example in a Microsoft Document/View
>>> application.
>>>
>>>
>>> The compile is fine with no errors however, I am getting a LNK 2019 error on
>>> the vtkRender::new call (static).
>>>
>>>
>>>
>>> VTK Basic AppView.obj : error LNK2019: unresolved external symbol
>>> "__declspec(dllimport) public: static class vtkRenderer * __cdecl
>>> vtkRenderer::New(void)" (__imp_?New at vtkRenderer@@SAPAV1 at XZ) referenced in
>>> function "protected: __thiscall CVTKBasicAppView::CVTKBasicAppView(void)"
>>> (??0CVTKBasicAppView@@IAE at XZ)
>>>
>>>
>>> C:\Software Development\VTK Windows Development\VTK Basic App\Debug\VTK
>>> Basic App.exe : fatal error LNK1120: 1 unresolved externals
>>>
>>>
>>> Has anyone had the same experience and how was it resolved?
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Please keep messages on-topic and check the VTK FAQ at:
>>> http://www.vtk.org/Wiki/VTK_FAQ
>>>
>>> Search the list archives at: http://markmail.org/search/?q=vtkusers
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://public.kitware.com/mailman/listinfo/vtkusers
>>>
>>
>>
>>
>> --
>> Unpaid intern in BillsBasement at noware dot com
>
>
>
> --
> Unpaid intern in BillsBasement at noware dot com



-- 
Unpaid intern in BillsBasement at noware dot com


More information about the vtkusers mailing list