[vtkusers] Problems compiling VTK on Red Hat Linux

Brad King brad.king at kitware.com
Wed Jul 14 12:12:14 EDT 2004


Michael Rivera wrote:
> Hello,
> 
> I'm am trying to compile VTK from the source code for my Intel box that 
> is running Red Hat Linux. The configuration I am running is:
> 
> Red Hat Linux 9.0 and and intel processer
> gcc compiler 3.2.2
> VTK-4.2-LatestRelease.tar.gz
> 
> I get major errors for the subroutine vtkDataArraySelection.cxx. A 
> sample below is included below.
> **********
>    /usr/local/src/VTK/Common/vtkDataArraySelection.cxx:36: parse error 
> before `<'
>       token
>    /usr/local/src/VTK/Common/vtkDataArraySelection.cxx:37: parse error 
> before `<'
>       token
>    /usr/local/src/VTK/Common/vtkDataArraySelection.cxx: In constructor
>   `    vtkDataArraySelection::vtkDataArraySelection()':
>    /usr/local/src/VTK/Common/vtkDataArraySelection.cxx:42: invalid use of
>       undefined type `class vtkDataArraySelectionArrayNamesType'
>    /usr/local/src/VTK/Common/vtkDataArraySelection.h:31: forward 
> declaration of `
>       class vtkDataArraySelectionArrayNamesType'
>    /usr/local/src/VTK/Common/vtkDataArraySelection.cxx:43: invalid use of
>       undefined type `class vtkDataArraySelectionArraySettingsType'
> 
> (And the list goes on because it cannot identify the defined classes)
> ***********
> 
> I also downloaded  the nightly release of this subroutine with similar 
> results. I defined the VTK_DATA_ROOT, VTK_ROOT with  BUILD_EXAMPLES=ON 
> BUILD_SHARED_LIBS=ON, VTK_WRAP_TCL=ON and VTK_WRAP_PYTHON=ON. Maybe I'm 
> just missing something extra from my path or something like that. Maybe 
> I should upgrade the compiler?
> 
> I am familiar with VTK for Windows systems. I have installed the 
> binaries for both Windows 98 and Windows XP Pro. No problems there. I'd 
> like to get it going on the Linux box. Any thoughts are greatly 
> appreciated.

These errors indicate that the "vtkstd" macro is getting set incorrectly 
for your compiler.  VTK asks CMake to tell it whether the compiler 
supports the std:: namespace, and CMake does a try-compile to test it. 
Something is causing the wrong answer to come back.  Look at 
CMakeError.log at the top of the build tree for messages about support 
for the std namespace.

-Brad



More information about the vtkusers mailing list