[vtkusers] post:error LNK2019
Dominik Szczerba
dominik at itis.ethz.ch
Mon Dec 8 03:33:36 EST 2008
go to the project settings in VC++ and inspect the linker command line -
and post it here. Also pls always reply to the list, not private.
Dominik
Matthieu Duvinage wrote:
> Thank you for your response, however, I have linked the librairy. I put
> the the library repertory to this of VTK/lib and Widgets.lib is there.
> Therefore I don't understand why it doesn't work....
> Those are the includes used in the program :
>
> #include <vtkBMPReader.h>
> #include <vtkCamera.h>
> #include "vtkFloatArray.h"
> #include "vtkImageChangeInformation.h"
> #include <vtkImageData.h>
> #include "vtkImagePlaneWidget.h"
> #include "vtkImageReslice.h"
> #include "vtkImageViewer2.h"
> #include <vtkImageVOLReader.h>
> #include <vtk3DWidget.h>
> #include "vtkRenderer.h"
> #include "vtkRenderWindow.h"
> #include "vtkWindowToImageFilter.h"
> #include "vtkImagethreshold.h"
> #include "vtkContourFilter.h"
> #include "vtkSphereSource.h"
> #include "vtkPolyDataMapper.h"
> #include "vtkActor.h"
> #include "vtkRenderWindow.h"
> #include "vtkRenderer.h"
> #include "vtkRenderWindowInteractor.h"
> #include "vtkQuadric.h"
> #include "vtkSampleFunction.h"
> #include "vtkOutlineFilter.h"
> #include "vtkPolyDataMapper.h"
> #include "vtkActor.h"
> #include "vtkProperty.h"
> #include "vtkMarchingCubes.h"
>
> I hope I hear from you soon.
>
> Best regards
> Matthieu
> Dominik Szczerba a écrit :
>> You are not linking to the library containing the widget, my guess is
>> vtkWidgets
>>
>> Dominik
>>
>> Matthieu Duvinage wrote:
>>> Hello everybody,
>>>
>>> this is my first post. I have some problems with the use of
>>> vtkImagePlaneWidget. I'm using Visual c++ 2008 express with VTK 5.2.
>>> In fact, I have already used some functions of this library as
>>> decimate, smoothing, ... without any problems of linkage. However,
>>> when I try to use a vtkImagePlaneWidget in order to add 2D slices in
>>> a 3D volume, I get this error message :
>>>
>>> Mercator.obj : error LNK2019: symbole externe non résolu
>>> "__declspec(dllimport) public: static class vtkImagePlaneWidget *
>>> __cdecl vtkImagePlaneWidget::New(void)"
>>> (__imp_?New at vtkImagePlaneWidget@@SAPAV1 at XZ) référencé dans la
>>> fonction "void __cdecl image_reader(class Fl_Widget *,void *)"
>>> (?image_reader@@YAXPAVFl_Widget@@PAX at Z)
>>>
>>> I used Cmake with rendering, parall options enabled and the build all
>>> was processed in visual 2008.
>>> This error occurs when I use this line:
>>> vtkImagePlaneWidget*toto=vtkImagePlaneWidget::New();
>>>
>>> Do you have the faintest idea of what is happening and what do I
>>> have to do ?
>>>
>>> I hope I hear from you soon.
>>>
>>> Best regards
>>>
>>> Duvi
>>>
>>>
>>> _______________________________________________
>>> This is the private VTK discussion list.
>>> Please keep messages on-topic. Check the FAQ at:
>>> http://www.vtk.org/Wiki/VTK_FAQ
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.vtk.org/mailman/listinfo/vtkusers
>>>
>>
>
--
Dominik Szczerba, PhD
Computational Physics Group
IT'IS Foundation
http://www.itis.ethz.ch
More information about the vtkusers
mailing list