Skip to content

compile failed in Ubuntu 12.04 with g++ 4.8.1 #1

@yuhuazou

Description

@yuhuazou

Hi, thanks for your great work and sharing the code. I've suceeded to compile it in Windows 7 with VS 2012, but failed in Ubuntu 12.04 with g++ 4.8.1.

Here's the configuration of my g++ compiler:

yuhuazou@zyh-ntu-linux:~ $ g++ -v
  Using built-in specs.
  COLLECT_GCC=g++
  COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper
  Target: x86_64-linux-gnu
  Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.8.1-2ubuntu1~12.04' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
  Thread model: posix
  gcc version 4.8.1 (Ubuntu 4.8.1-2ubuntu1~12.04) 

Compile failed with errors like these:

/opt/pcl/include/pcl-1.7/pcl/io/openni_camera/openni_depth_image.h: In constructor ‘openni_wrapper::DepthImage::DepthImage(boost::shared_ptr<xn::DepthMetaData>, float, float, int, int)’:
/opt/pcl/include/pcl-1.7/pcl/io/openni_camera/openni_depth_image.h:169:5: error: class ‘openni_wrapper::DepthImage’ does not have any field named ‘shadow_value_’
   , shadow_value_ (shadow_value)
     ^
/opt/pcl/include/pcl-1.7/pcl/io/openni_camera/openni_depth_image.h:170:5: error: class ‘openni_wrapper::DepthImage’ does not have any field named ‘no_sample_value_’
   , no_sample_value_ (no_sample_value) { }
     ^
/opt/pcl/include/pcl-1.7/pcl/io/openni_camera/openni_depth_image.h: At global scope:
/opt/pcl/include/pcl-1.7/pcl/io/openni_camera/openni_depth_image.h:192:3: error: ‘XnUInt64’ does not name a type
   XnUInt64
   ^
/opt/pcl/include/pcl-1.7/pcl/io/openni_camera/openni_depth_image.h:198:3: error: ‘XnUInt64’ does not name a type
   XnUInt64
   ^
/opt/pcl/include/pcl-1.7/pcl/io/openni_camera/openni_depth_image.h: In member function ‘unsigned int openni_wrapper::DepthImage::getWidth() const’:
/opt/pcl/include/pcl-1.7/pcl/io/openni_camera/openni_depth_image.h:207:23: error: ‘class xn::DepthMetaData’ has no member named ‘XRes’
     return depth_md_->XRes ();
                       ^
/opt/pcl/include/pcl-1.7/pcl/io/openni_camera/openni_depth_image.h: In member function ‘unsigned int openni_wrapper::DepthImage::getHeight() const’:
/opt/pcl/include/pcl-1.7/pcl/io/openni_camera/openni_depth_image.h:213:23: error: ‘class xn::DepthMetaData’ has no member named ‘YRes’
     return depth_md_->YRes ();
                       ^
/opt/pcl/include/pcl-1.7/pcl/io/openni_camera/openni_depth_image.h: In member function ‘unsigned int openni_wrapper::DepthImage::getFrameID() const’:
/opt/pcl/include/pcl-1.7/pcl/io/openni_camera/openni_depth_image.h:219:23: error: ‘class xn::DepthMetaData’ has no member named ‘FrameID’
     return depth_md_->FrameID ();
                       ^
/opt/pcl/include/pcl-1.7/pcl/io/openni_camera/openni_depth_image.h: In member function ‘long unsigned int openni_wrapper::DepthImage::getTimeStamp() const’:
/opt/pcl/include/pcl-1.7/pcl/io/openni_camera/openni_depth_image.h:225:51: error: ‘class xn::DepthMetaData’ has no member named ‘Timestamp’
     return static_cast<unsigned long> (depth_md_->Timestamp ());
                                                   ^
In file included from /opt/pcl/include/pcl-1.7/pcl/io/openni_grabber.h:52:0,
                 from /home/yuhuazou/Dropbox/Workspace/OpenCV/organized_segmentation_tools/include/organized_segmentation_tools/organized_segmentation_tbb.h:44,
                 from /home/yuhuazou/Dropbox/Workspace/OpenCV/organized_segmentation_tools/src/organized_segmentation_tbb.cpp:39:
/opt/pcl/include/pcl-1.7/pcl/io/openni_camera/openni_ir_image.h: In member function ‘unsigned int openni_wrapper::IRImage::getWidth() const’:
/opt/pcl/include/pcl-1.7/pcl/io/openni_camera/openni_ir_image.h:83:18: error: ‘class xn::IRMetaData’ has no member named ‘XRes’
   return ir_md_->XRes ();
                  ^
/opt/pcl/include/pcl-1.7/pcl/io/openni_camera/openni_ir_image.h: In member function ‘unsigned int openni_wrapper::IRImage::getHeight() const’:
/opt/pcl/include/pcl-1.7/pcl/io/openni_camera/openni_ir_image.h:88:18: error: ‘class xn::IRMetaData’ has no member named ‘YRes’
   return ir_md_->YRes ();
                  ^
/opt/pcl/include/pcl-1.7/pcl/io/openni_camera/openni_ir_image.h: In member function ‘unsigned int openni_wrapper::IRImage::getFrameID() const’:
/opt/pcl/include/pcl-1.7/pcl/io/openni_camera/openni_ir_image.h:93:18: error: ‘class xn::IRMetaData’ has no member named ‘FrameID’
   return ir_md_->FrameID ();
                  ^
/opt/pcl/include/pcl-1.7/pcl/io/openni_camera/openni_ir_image.h: In member function ‘long unsigned int openni_wrapper::IRImage::getTimeStamp() const’:
/opt/pcl/include/pcl-1.7/pcl/io/openni_camera/openni_ir_image.h:98:46: error: ‘class xn::IRMetaData’ has no member named ‘Timestamp’
   return static_cast<unsigned long> (ir_md_->Timestamp ());
                                              ^
In file included from /home/yuhuazou/Dropbox/Workspace/OpenCV/organized_segmentation_tools/include/organized_segmentation_tools/organized_segmentation_tbb.h:44:0,
                 from /home/yuhuazou/Dropbox/Workspace/OpenCV/organized_segmentation_tools/src/organized_segmentation_tbb.cpp:39:
/opt/pcl/include/pcl-1.7/pcl/io/openni_grabber.h: In member function ‘bool pcl::OpenNIGrabber::modeComp::operator()(const XnMapOutputMode&, const XnMapOutputMode&) const’:
/opt/pcl/include/pcl-1.7/pcl/io/openni_grabber.h:451:21: error: ‘const XnMapOutputMode’ has no member named ‘nXRes’
           if (mode1.nXRes < mode2.nXRes)
                     ^
/opt/pcl/include/pcl-1.7/pcl/io/openni_grabber.h:451:35: error: ‘const XnMapOutputMode’ has no member named ‘nXRes’
           if (mode1.nXRes < mode2.nXRes)
                                   ^
/opt/pcl/include/pcl-1.7/pcl/io/openni_grabber.h:453:26: error: ‘const XnMapOutputMode’ has no member named ‘nXRes’
           else if (mode1.nXRes > mode2.nXRes)
                          ^
/opt/pcl/include/pcl-1.7/pcl/io/openni_grabber.h:453:40: error: ‘const XnMapOutputMode’ has no member named ‘nXRes’
           else if (mode1.nXRes > mode2.nXRes)
                                        ^
/opt/pcl/include/pcl-1.7/pcl/io/openni_grabber.h:455:26: error: ‘const XnMapOutputMode’ has no member named ‘nYRes’
           else if (mode1.nYRes < mode2.nYRes)
                          ^
/opt/pcl/include/pcl-1.7/pcl/io/openni_grabber.h:455:40: error: ‘const XnMapOutputMode’ has no member named ‘nYRes’
           else if (mode1.nYRes < mode2.nYRes)
                                        ^
/opt/pcl/include/pcl-1.7/pcl/io/openni_grabber.h:457:26: error: ‘const XnMapOutputMode’ has no member named ‘nYRes’
           else if (mode1.nYRes > mode2.nYRes)
                          ^
/opt/pcl/include/pcl-1.7/pcl/io/openni_grabber.h:457:40: error: ‘const XnMapOutputMode’ has no member named ‘nYRes’
           else if (mode1.nYRes > mode2.nYRes)
                                        ^
/opt/pcl/include/pcl-1.7/pcl/io/openni_grabber.h:459:26: error: ‘const XnMapOutputMode’ has no member named ‘nFPS’
           else if (mode1.nFPS < mode2.nFPS)
                          ^
/opt/pcl/include/pcl-1.7/pcl/io/openni_grabber.h:459:39: error: ‘const XnMapOutputMode’ has no member named ‘nFPS’
           else if (mode1.nFPS < mode2.nFPS)
                                       ^
make[2]: *** [CMakeFiles/organized_segmentation_tools.dir/src/organized_segmentation_tbb.cpp.o] Error 1
make[1]: *** [CMakeFiles/organized_segmentation_tools.dir/all] Error 2
make: *** [all] Error 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions