unresolved external _declspec ....vtkCamera

Paul Hsieh pahsieh at usgs.gov
Tue Aug 24 20:43:15 EDT 1999


Hi Rong:

> ... I still got one linking error like this:
> 
> linking...
> LINK : warning LNK4075: ignoring /EDITANDCONTINUE due to /INCREMENTAL:NO specification
> Cone2.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall vtkCamera::Azimuth(double)" (__imp_?Azimuth at vtkCamera@@QAEXN at Z)
> Debug/Cone2.exe : fatal error LNK1120: 1 unresolved externals
> Error executing link.exe.
> 
>  (1) why ?

It should have worked. My guess is that you are using an old version of vtkdll.lib.
One change from version 2.3 to 2.4 is that some vtkCamera ivars such as azimuth,
position, focal point, etc were changed from float to double. If you mistakenly
used vtkdll.lib from version 2.3, the linker will find vtkCamera::Azimuth(float)
instead of vtkCamera::Azimuth(double). 

If this is not the explanation of the problem, then I maybe your vtkdll.lib file
got corrupted. In that case I would suggest reinstalling it.
 
Another option is to try another example that doesn't invoke vtkCamera::Azimuth(),
such as cone3.cxx. This doesn't solve the problem but might get you started using vtk.
(Actually cone3 is a better example than cone2 because it allows you to interact
with the renderer.)

> (2)Why it is impossible to add the vtkdll.lib as this: D:\Program Files\vtk24\lib\vtkdll.lib (this cause problem like: can not open file D:\Program.obj)?

Because "Program Files" has a space in it, you must put the path in double quotes,
that is: "D:\Program Files\vtk24\lib\vtkdll.lib"

Good Luck.
Paul


-----------------------------------------------------------------------------
This is the private VTK discussion list.  Please keep messages on-topic.
Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at gsao.med.ge.com>.  For help, send message body containing
"info vtkusers" to the same address.     Live long and prosper.
-----------------------------------------------------------------------------





More information about the vtkusers mailing list