[vtkusers] FLTK and VTK on VC++

Hassan Amin sha1 at doc.ic.ac.uk
Fri Jun 24 06:17:19 EDT 2005


Cesar Rabak wrote:

>It seems FLTK includes in its 'math.h' the header file
><float.h>, but VC++ declares floor in its own <math.h>
>header.
>
>Try to put #include <math.h> ahead of the FLTK include
>files and see if the compilation goes.
>
>HTH
>
>--- Hassan Amin <sha1 at doc.ic.ac.uk> escreveu:
>
>  
>
>>I am a beginner at VTK.I am trying to use FLTK with
>>VTK on VC++ .Net 
>>platform. I am getting the following compilation
>>error :
>>C:\fltk_bin\FL\math.H(59): error C3861: 'floor':
>>identifier not found, 
>>even with argument-dependent lookup
>>Please help me with this error. Has anybody tried to
>>use MFC-VTK 
>>combination on windows , is there any help available
>>on that direction.
>>
>>S. Hassan Amin
>>
>>
>>_______________________________________________
>>This is the private VTK discussion list. 
>>Please keep messages on-topic. Check the FAQ at:
>>http://www.vtk.org/Wiki/VTK_FAQ
>>Follow this link to subscribe/unsubscribe:
>>http://www.vtk.org/mailman/listinfo/vtkusers
>>
>>    
>>
>
>
>
>	
>	
>		
>_______________________________________________________ 
>Yahoo! Acesso Grátis - Internet rápida e grátis. 
>Instale o discador agora! http://br.acesso.yahoo.com/
>  
>
No , it did not work , here is the code that I am trying to compile on 
VC++ .Net :-
#include <math.h>
#include <Fl_Window.H>
#include "vtkConeSource.h"
#include "vtkPolyDataMapper.h"
#include "vtkPolyDataReader.h"
#include "vtkRenderWindow.h"
#include "vtkRenderWindowInteractor.h"
#include "vtkCamera.h"
#include "vtkActor.h"
#include "vtkRenderer.h"

//**************************************************************************
void FL_Initialize();
//**************************************************************************
void main()
{
  vtkPolyDataReader *lmk_reader = vtkPolyDataReader::New();
  lmk_reader->SetFileName("C:\\notred\\eigenspace\\02463_458.vtk");
  vtkPolyDataMapper *coneMapper = vtkPolyDataMapper::New();
  coneMapper->SetInput( lmk_reader->GetOutput() );
  vtkActor *coneActor = vtkActor::New();
  coneActor->SetMapper( coneMapper );
  vtkRenderer *ren1= vtkRenderer::New();
  ren1->AddActor( coneActor );
  ren1->SetBackground( 0.1, 0.2, 0.4 );
  vtkRenderWindow *renWin = vtkRenderWindow::New();
  renWin->AddRenderer( ren1 );
  renWin->SetSize( 300, 300 );
  int i;
  for (i = 0; i < 360; ++i)
    {
    // render the image
    renWin->Render();
    // rotate the active camera by one degree
    ren1->GetActiveCamera()->Azimuth( 1 );
    }
 
  //
  vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();
  iren->SetRenderWindow(renWin);
  //Setting up event processing loop
  iren->Initialize();
  iren->Start();
  //Cleaning
  lmk_reader->Delete();
  coneMapper->Delete();
  coneActor->Delete();
  ren1->Delete();
  renWin->Delete();

 
}
//******************************************************************************
void FL_Initialize()
{
  // set up main FLTK window
  Fl_Window *mainWindow = new Fl_Window(875, 650,"Matcher");
}

Thanks,

S. Hassan Amin



More information about the vtkusers mailing list