[vtkusers] error compiling VTK40 on SuSE Linux 8.1

Frank Broicher broicher at techinfo.rwth-aachen.de
Thu Oct 10 07:26:23 EDT 2002


Hi,

this is exactly why we haven't upgraded yet. The standard compiler
on a SuSE 8.1 system is gcc 3.2 (AFAIK). This compiler is stricter
that the "old" gcc 2.9.xy and compiler closer to the standards, as
you can see in your mail. Your problem can be solved by type-casting
the pointer (static_cast) char** to const char**.

With Best Regards
	Frank


Rainer Lehrig schrieb:
> Hi,
> 
> when compiling VTK40 on SuSE Linux 8.1 i get an error.
> On SuSE Linux 8.0 it did work.
> 
> The error message is:
> 
> /home/lehrig/cc/priv/vtk-src-unix/Common/vtkCommonTCLInit.cxx: In function 
> `int
>    Vtkcommontcl_Init(Tcl_Interp*)':
> /home/lehrig/cc/priv/vtk-src-unix/Common/vtkCommonTCLInit.cxx:370: invalid
>    conversion from `int (*)(void*, Tcl_Interp*, int, char**)' to `int
>    (*)(void*, Tcl_Interp*, int, const char**)'
> make[3]: *** [vtkCommonTCLInit.o] Fehler 1
> make[2]: *** [default_target] Fehler 2
> make[1]: *** [default_target_Common] Fehler 2
> make: *** [default_target] Fehler 2
> 
> The code looks like:
> 
> int VTK_EXPORT Vtkcommontcl_Init(Tcl_Interp *interp)
> {
>   vtkTclInterpStruct *info = new vtkTclInterpStruct;
>   info->Number = 0; info->InDelete = 0; info->DebugOn = 0;
> 
> 
>   Tcl_InitHashTable(&info->InstanceLookup, TCL_STRING_KEYS);
>   Tcl_InitHashTable(&info->PointerLookup, TCL_STRING_KEYS);
>   Tcl_InitHashTable(&info->CommandLookup, TCL_STRING_KEYS);
>   Tcl_SetAssocData(interp,(char *) "vtk",NULL,(ClientData *)info);
>   Tcl_CreateExitHandler(vtkCommonDeleteAssocData,(ClientData *)info);
>   Tcl_CreateCommand(interp,(char *) "vtkCommand",vtkCommand,
> 		    (ClientData *)NULL, NULL); // The error is caused by the last parameter
> 
> 
>   vtkTclCreateNew(interp,(char *) "vtkFunctionParser", 
> vtkFunctionParserNewCommand,
>                   vtkFunctionParserCommand);
>   vtkTclCreateNew(interp,(char *) "vtkObjectFactoryCollection", 
> vtkObjectFactoryCollectionNewCommand,
>                   vtkObjectFactoryCollectionCommand);
>   vtkTclCreateNew(interp,(char *) "vtkPlanes", vtkPlanesNewCommand,
>                   vtkPlanesCommand);
> 
>   ...
> 
> Yours:
> Rainer Lehrig
> _______________________________________________
> This is the private VTK discussion list. 
> Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
> 



-- 
Dipl.-Inform. F. H. Broicher

Chair of Technical Computer Science  Lehrstuhl f. Technische Informatik
RWTH Aachen University                                      RWTH-Aachen
Ahornstraße 55,  Room 2226
D-52074 Aachen
------------------------------------------------------------------------
  Tel.: +49 (241) 80 23636       mailto:broicher at techinfo.rwth-aachen.de
  Fax.: +49 (241) 80 22308       mailto:frank.broicher at ieee.org
------------------------------------------------------------------------
Fate, it seems, is not without a sense of irony. (Morpheus, The Matrix)




More information about the vtkusers mailing list