[vtkusers] post:error LNK2019

Matthieu Duvinage matthieu.duvinage at gmail.com
Mon Dec 8 03:48:21 EST 2008


Thank you !!!
The command line was :

/OUT:".\Debug/Mercator.exe" /INCREMENTAL:NO /NOLOGO /LIBPATH:"C:\Program 
Files\VTK\lib" /LIBPATH:"C:\Program Files\fltk-1.1.2\lib" /MANIFEST 
/MANIFESTFILE:".\Debug\Mercator.exe.intermediate.manifest" 
/MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG 
/PDB:".\Debug/Mercator.pdb" /SUBSYSTEM:CONSOLE /DYNAMICBASE:NO 
/MACHINE:X86 /ERRORREPORT:PROMPT odbc32.lib odbccp32.lib vtkCommon.lib 
vtkFiltering.lib vtkGraphics.lib vtkHybrid.lib vtkImaging.lib vtkIO.lib 
vtkjpeg.lib vtkParallel.lib vtkpng.lib vtkRendering.lib vtkzlib.lib 
wsock32.lib comctl32.lib fltkd.lib fltkformsd.lib fltkgld.lib 
fltkimagesd.lib opengl32.lib  kernel32.lib user32.lib gdi32.lib 
winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib 
oleaut32.lib uuid.lib odbc32.lib odbccp32.lib

And I saw that the lib vtkWidgets was not added what is astonishing 
given that the other librairies were correctly added.

Thank you and have a very nice day !

Best regards

Matthieu

Dominik Szczerba a écrit :
> 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
>>>>
>>>
>>
>




More information about the vtkusers mailing list