Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C++ 11 is necessary to compile with latest image_geometry package #291

Closed
alexzzhu opened this issue Aug 29, 2017 · 5 comments
Closed

C++ 11 is necessary to compile with latest image_geometry package #291

alexzzhu opened this issue Aug 29, 2017 · 5 comments

Comments

@alexzzhu
Copy link

The image_geometry package now compiles with C++ 11 by default: (https://github.com/ros-perception/vision_opencv/blob/8b5bbcbc1ce65734dc600695487909e0c67c1033/image_geometry/CMakeLists.txt#L15) , and uses std::shared_ptr: (https://github.com/ros-perception/vision_opencv/blob/8b5bbcbc1ce65734dc600695487909e0c67c1033/image_geometry/include/image_geometry/pinhole_camera_model.h#L273).

At present, image_pipeline does not compile with C++ 11, which causes the compiler to crash when compiling with image_geometry.

@Chambana
Copy link

Chambana commented Sep 3, 2017

I believe I'm having the same issue. The build fails with:

[ 52%] Building CXX object image_pipeline/image_proc/CMakeFiles/image_proc.dir/src/nodelets/rectify.cpp.o
In file included from /home/drew/catkin_ws/src/image_pipeline/image_proc/include/image_proc/processor.h:38:0,
from /home/drew/catkin_ws/src/image_pipeline/image_proc/src/libimage_proc/processor.cpp:34:
/home/drew/catkin_ws/src/vision_opencv/image_geometry/include/image_geometry/pinhole_camera_model.h:273:8: error: ‘shared_ptr’ in namespace ‘std’ does not name a template type
std::shared_ptr cache_; // Holds cached data for internal use

@alexzzhu
Copy link
Author

alexzzhu commented Sep 4, 2017

This is resolved by specifying c++ 11 in the CMakeLists:
SET(CMAKE_CXX_FLAGS -std=c++11)

If having c++ 11 is an acceptable assumption moving forwards, I can make a PR to put this into the main branch.

@Chambana
Copy link

Chambana commented Sep 4, 2017

Yes, please do

@alexzzhu
Copy link
Author

alexzzhu commented Sep 8, 2017

PR developed: #292

vrabaud added a commit that referenced this issue Sep 18, 2017
@vrabaud
Copy link
Contributor

vrabaud commented Sep 18, 2017

Sorry for the delay, 98670bd fixes it properly.

@vrabaud vrabaud closed this as completed Sep 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants