Compiling VTK 3.1 as stdcall

luis.uriarte at philips.com luis.uriarte at philips.com
Wed May 17 10:20:01 EDT 2000


Hi everybody,

I´m using Visual Basic as my graphics interface in an application that uses VTK. I build a DLL using VC++ 6.0 and use it from VB. Instead of compiling VTK as cdecl I complie it as stdcall since it´s better to work with VB.
I´ve been doing this with VTK 2.0 with no problem, but when I changed to VTK 3.1 I got the following error messages.

C:\vtk31\common\vtkPointLocator.cxx(XXXX) : error C2664: ´qsort´ : cannot convert parameter 4 from ´int (const void *,const void *)´ to ´int (__cdecl *)(const void *,const void *)´
	None of the functions with this name in scope match the target type 

XXXX take the values 422, 429, 442, 467, 564, 571, 582 and 604.

To compile as stdcall I edit the makefile in the following way (I do the same thing with version 2.0 and 3.1).

ORIGINAL

CPP_PROJ=/nologo /D "STRICT" /MD /Ob1 /Oi /Ot /Oy /Gs /I "C:\Archivos de programa\Microsoft Visual Studio\VC98\include" /I "C:\vtk31\common" /I "C:\vtk31\graphics" /I "C:\vtk31\imaging" /D "NDEBUG" /D "WIN32" \
 /D "VTK_USE_PATENTED" /I "C:\vtk31\patented" \
 /D "VTK_USE_CONTRIB" /I "C:\vtk31\contrib" \
  /D "_WINDOWS" /D "_WINDLL" /D "_MBCS" /D "VTKDLL"\
/W2  /Fo$(OBJDIR)\ /c

MODIFIED

CPP_PROJ=/nologo /D "STRICT" /MTd /G5 /GD /Gz /LDd /O2 /Ot /Ox /I "C:\Archivos de programa\Microsoft Visual Studio\VC98\include" /I "C:\vtk31\common" /I "C:\vtk31\graphics" /I "C:\vtk31\imaging" /D "NDEBUG" /D "WIN32" \
 /D "VTK_USE_PATENTED" /I "C:\vtk31\patented" \
 /D "VTK_USE_CONTRIB" /I "C:\vtk31\contrib" \
  /D "_WINDOWS" /D "_WINDLL" /D "_MBCS" /D "VTKDLL"\
/W2  /Fo$(OBJDIR)\ /c

vtk31 is the directory where I have VTK.

There´s something in the new way vtkPointLocator is defined in VTK 3.1 that prevents me from compling it as stdcall but I cant figure out what it is.
Any help would be greatly appreciated.

Luis.
--------------------------------------------------------------------
This is the private VTK discussion list. Please keep messages on-topic.
Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at public.kitware.com>. For help, send message body containing
"info vtkusers" to the same address.
--------------------------------------------------------------------



More information about the vtkusers mailing list