[vtkusers] error when using RemoveActor()

REGAT-BARREL Aurélien arbvtk at yahoo.fr
Wed May 12 18:32:53 EDT 2004


Hello,
I don't know the problem, but I think it is an issue of the point I have just developed.
The problem is Win32 specific and is due to macros definitions in <windows.h>
The problem, In my opinion, is that including vtk includes windows.h, and I think it should not be the case.
Actually, GetClassName, GetProp, SetProp, RemoveProps and certainly others does not exist ! These functions are translated to GetClassNameA, GetPropA, SetPropA and RemovePropA because of the inclusion of <windows.h>
In a normal case, this is not a problem since your RemoveProp call is also translated to RemovePropA.
But, if you have defined UNICODE, your call is translated to RemovePropW. And you have an error...
More details about windows.h header:
http://msdn.microsoft.com/library/en-us/intl/unicode_8zzn.asp

The easy solution : undef UNICODE or change your RemoveProp call to RemovePropA...
The right solution : remove windows.h from vtk headers !!!

Matt Schmiermund <matt at plasticflow.com> wrote:
Anyone?????

This problem is in the archives, but no one ever
posted a solution. I changed from using RemoveActor()
to RemoveProp() and I am still getting the same error.
Any help would be appreciated.

-Matt Schmiermund

--- Matt Schmiermund wrote:
> I get the following error after adding some
> RemoveActor lines to my program. 
> 
> Error: Unresolved external
> 'vtkViewport::RemovePropW(vtkProp *)' referenced
> from
> C:\DOCUMENTS AND SETTINGS\ALL
> USERS\DOCUMENTS\PELDOMFLOW\VTKWIDGET.OBJ
> 
> 
> This looked similar to what happened when I didn't
> have the librarys linking properly, so I have linked
> to all of the following libraries (some of which I
> think are probably unnecessary) and I am still
> getting
> the same error.
> 
> vtkFiltering
> vtkRendering 
> vtkCommon 
> vtkGraphics 
> vtkIO 
> vtkImaging 
> vtkHybrid 
> vtkParallel 
> vtkPatented
> vtkqt 
> vtkexpat 
> vtkfreetype 
> vtkftgl 
> vtkjpeg 
> vtkpng 
> vtktiff 
> vtkzlib 
> 
> If anyone knows what I am doing wrong I would
> appreciate any help.
> 
> -Matt Schmiermund
> _______________________________________________
> This is the private VTK discussion list. 
> Please keep messages on-topic. Check the FAQ at:
> 
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers

_______________________________________________
This is the private VTK discussion list. 
Please keep messages on-topic. Check the FAQ at: 
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers

Aurélien REGAT-BARREL
		
---------------------------------
Yahoo! Mail : votre e-mail personnel et gratuit qui vous suit partout !
Créez votre Yahoo! Mail

Dialoguez en direct avec vos amis grâce à Yahoo! Messenger !
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20040513/b9c0d34a/attachment.htm>


More information about the vtkusers mailing list