Author Topic: PCL: Compilation with diagnostics fails  (Read 2665 times)

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
PCL: Compilation with diagnostics fails
« on: 2011 June 29 10:55:50 »
Compiling with PCL diagnostics fails with (error translated from German to English) "»refCount« not defined in this scope".

Georg

Code: [Select]
g++ -c -pipe -m64 -fPIC -D_REENTRANT -D__PCL_LINUX  -D__PCL_DIAGNOSTICS_LEVEL=2 -I"/home/georg/PCL_1.0.94/include" ...
...
/home/georg/PCL_1.0.94/include/pcl/Vector.h: In Elementfunktion »void pcl::GenericVector<T>::Data::Deallocate()«:
/home/georg/PCL_1.0.94/include/pcl/Vector.h:751:10: Fehler: »refCount« wurde in diesem Gültigkeitsbereich nicht definiert
...

Offending piece of PCL code in vector.h:
Code: [Select]
      void Deallocate()
      {
         PCL_PRECONDITION( refCount == 0 )
         if ( v != 0 )
            delete [] v, v = 0, n = 0;
      }

Workaround:
Code: [Select]
//         PCL_PRECONDITION( refCount == 0 )
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)