[vtkusers] VTK 4.2 compile error in vtkScalarBarActor
    Jim Burger 
    burger at aue.auc.dk
       
    Sat Sep 27 10:52:04 EDT 2003
    
    
  
Oh so close.
 
On a clean Win2000 os + latest hole patches.
 
1)       full installation of MS Visual Studio.NET 2003
2)       installed CMake 1.8 patch 1
3)       extracted "VTK-4.2-LatestRelease.tar.gz"
4)       ran CMake against VTK 4.2 source code
5)       pointed Vis-Studio to the "VTK.sln" file
6)       ran Build | Build Solution
 
Result:
Everything compiled except two errors in vtkScalarBarActor:    (lines 357
and 536) same error:  looking for overloading of 'pow' to (int, float)
 
Since pow(float, float) is available, I tried casting the integer constants
to float, and compilation errors went away.
 
Question:  Since I'm brand new to vtk (a few hours!) I have no idea yet what
pow is doing, and/or why vtkScalarBar is trying to find an (int,float)
overload, but I gotta believe the code that I'm seeing.   So how come this
hasn't produced failed tests for anyone else?  Does the (float) casting
cause any problems?
 
Quite frankly, I expected LOTS of setup/compilation errors with such a new
project.  what did I REALLY do wrong?  ;-)
 
tia.
 
Jim
 
Source code and compilation output follows:
 
      float rgbval = log10(range[0]) + 
        i*(log10(range[1])-log10(range[0]))/(numColors -1);
      rgba = lut->MapValue(pow((float)10,rgbval));
 
      float lval = log10(range[0]) + (float)i/(this->NumberOfLabels-1) *
        (log10(range[1])-log10(range[0]));
      val = pow(10,lval);
 
 
 
 
vtkScalarBarActor.cxx
\VTK-4.2.2\Rendering\vtkScalarBarActor.cxx(357) : error C2666: 'pow' : 7
overloads have similar conversions
        C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\math.h(620): could be 'long double pow(long double,int)'
        C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\math.h(618): or       'long double pow(long double,long
double)'
        C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\math.h(572): or       'float pow(float,int)'
        C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\math.h(570): or       'float pow(float,float)'
        C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\math.h(534): or       'double pow(int,int)'
        C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\math.h(532): or       'double pow(double,int)'
        C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\math.h(195): or       'double pow(double,double)'
        while trying to match the argument list '(int, float)'
\VTK-4.2.2\Rendering\vtkScalarBarActor.cxx(536) : error C2666: 'pow' : 7
overloads have similar conversions
        C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\math.h(620): could be 'long double pow(long double,int)'
        C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\math.h(618): or       'long double pow(long double,long
double)'
        C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\math.h(572): or       'float pow(float,int)'
        C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\math.h(570): or       'float pow(float,float)'
        C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\math.h(534): or       'double pow(int,int)'
        C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\math.h(532): or       'double pow(double,int)'
        C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\math.h(195): or       'double pow(double,double)'
        while trying to match the argument list '(int, float)'
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20030927/f4d09fcd/attachment.htm>
    
    
More information about the vtkusers
mailing list