<html>
I have a working code that compiles, links, and runs flawlessly on a
Linux PC with VTK 4.0 using either gcc or pgCC (Portland Group).
Essentially the same code works on Windows with VC++ 6 or with Intel 7,
and on Irix with MIPS 7.<br><br>
I am trying to upgrade to VTK 4.2 on Linux (Red Hat 7.4).<br><br>
Both my copies of VTK, 4.0 and 4.2, came off their respective User's
Guide CD. Both versions of VTK seemed to build without error with
either compiler on Linux.<br><br>
The full application can be built with 4.2 only if I comment out the
source code involving vtkScalarBarActor or vtkTextActor.<br><br>
The problem is shown by a simple example code that fails to link with VTK
4.2 libraries on Linux:<br>
<dl>
<dd>#include <iostream.h>
<dd>#include "vtkScalarBarActor.h"
<dd>int main( int argc, char *argv[] )
<dd>{
<dd> cout << "Hello, world!\n";
<dd> vtkScalarBarActor *scalarBar =
vtkScalarBarActor::New();
<dd>}<br><br>
</dl>Here is the resulting of compiling with gcc:
<dl><font size=2>
<dd>g++ -g test.o -L/apps/vtk4.2_gcc/bin -lvtkRendering
-lvtkGraphics -lvtkImaging -lvtkFiltering -lvtkCommon -lvtkIO -lvtkHybrid
-L/apps/netcdf_gcc/src/cxx -lnetcdf_c++ -L/apps/netcdf_gcc/src/libsrc
-lnetcdf -L/usr/X11R6/lib -lXext -lXt -lSM -lICE -lX11 -lm -lGL -o test
<dd>/apps/vtk4.2_gcc/bin/libvtkRendering.a(vtkOpenGLFreeTypeTextMapper.o):
In function `vtkOpenGLFreeTypeTextMapper::GetSize(vtkViewport *, int
*)':
<dd>vtkOpenGLFreeTypeTextMapper.o(.text+0x4a1): undefined reference to
`FTFont::BBox(char const *, float &, float &, float &, float
&, float &, float &)'
<dd>vtkOpenGLFreeTypeTextMapper.o(.text+0x4bc): undefined reference to
`FTFont::Advance(char const *)'
<dd>/apps/vtk4.2_gcc/bin/libvtkRendering.a(vtkFreeTypeFontCache.o): In
function `vtkFreeTypeFontCache::GetFont(vtkTextProperty *, int, unsigned
char, unsigned char, unsigned char)':
<dd>vtkFreeTypeFontCache.o(.text+0x655): undefined reference to
`FTGLPixmapFont::FTGLPixmapFont(void)'
<dd>vtkFreeTypeFontCache.o(.text+0x66c): undefined reference to
`FTGLBitmapFont::FTGLBitmapFont(void)'
<dd>vtkFreeTypeFontCache.o(.text+0x6ac): undefined reference to
`FTFont::Open(char const *, char)'
<dd>vtkFreeTypeFontCache.o(.text+0x90a): undefined reference to
`FTFont::Attach(char const *)'
<dd>vtkFreeTypeFontCache.o(.text+0xcf4): undefined reference to
`FTFont::FaceSize(unsigned int, unsigned int)'
<dd>/apps/vtk4.2_gcc/bin/libvtkRendering.a(vtkFreeTypeFontCache.o): In
function
`vtkFreeTypeFontCacheCleanup::vtkFreeTypeFontCacheCleanup(void)':
<dd>vtkFreeTypeFontCache.o(.text+0x23): undefined reference to
`FTLibraryCleanup::AddDependency(void (*)(void))'
<dd>collect2: ld returned 1 exit status
<dd>gmake: *** [test] Error 1<br><br>
</font>
</dl>I haven't seen anything about this in the FAQ or the mailing
list.<br><br>
John <br><br>
<br>
<x-sigsep><p></x-sigsep>
<font color="#0000FF">John F. Davis, Ph.D.<br>
Scientific Software Engineering<br>
Los Alamos National Laboratory<br>
MS B295<br>
Los Alamos, New Mexico 87545<br>
Tel. (505) 667-4793<br>
Fax (505) 665-5402</font></html>