Skip to content
This repository has been archived by the owner on Jul 23, 2020. It is now read-only.

CMake error while installing #217

Closed
weiqiyang opened this issue May 14, 2019 · 1 comment
Closed

CMake error while installing #217

weiqiyang opened this issue May 14, 2019 · 1 comment

Comments

@weiqiyang
Copy link

I get the following error when I was trying to do make install.

[  1%] Building CXX object src/Util/CMakeFiles/CnoidUtil.dir/SceneCameras.cpp.o
In file included from $Chorenoid_DIR$/src/Util/SceneCameras.cpp:6:0:
$Chorenoid_DIR$/src/Util/SceneCameras.h: In member function ‘double cnoid::SgCamera::nearDistance() const’:
$Chorenoid_DIR$/src/Util/SceneCameras.h:43:42: error: ‘nearDistance_’ was not declared in this scope
     double nearDistance() const { return nearDistance_; }
                                          ^
$Chorenoid_DIR$/src/Util/SceneCameras.h: In member function ‘void cnoid::SgCamera::setNearDistance(double)’:
$Chorenoid_DIR$/src/Util/SceneCameras.h:44:38: error: ‘nearDistance_’ was not declared in this scope
     void setNearDistance(double d) { nearDistance_ = d; }
                                      ^
$Chorenoid_DIR$/src/Util/SceneCameras.h: In member function ‘double cnoid::SgCamera::farDistance() const’:
$Chorenoid_DIR$/src/Util/SceneCameras.h:45:41: error: ‘farDistance_’ was not declared in this scope
     double farDistance() const { return farDistance_; }
                                         ^
$Chorenoid_DIR$/src/Util/SceneCameras.h: In member function ‘void cnoid::SgCamera::setFarDistance(double)’:
$Chorenoid_DIR$/src/Util/SceneCameras.h:46:37: error: ‘farDistance_’ was not declared in this scope
     void setFarDistance(double d) { farDistance_ = d; }
                                     ^
src/Util/CMakeFiles/CnoidUtil.dir/build.make:786: recipe for target 'src/Util/CMakeFiles/CnoidUtil.dir/SceneCameras.cpp.o' failed
make[2]: *** [src/Util/CMakeFiles/CnoidUtil.dir/SceneCameras.cpp.o] Error 1
CMakeFiles/Makefile2:329: recipe for target 'src/Util/CMakeFiles/CnoidUtil.dir/all' failed
make[1]: *** [src/Util/CMakeFiles/CnoidUtil.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2

I am working on ubuntu-16.04, with cmake 3.5.1.
The configuration and generation were done before make install by cmake-gui.

@s-nakaoka
Copy link
Owner

Thank you for informing this.
I have fixed this problem.
f7ceba6

The errors occur when CNOID_BACKWARD_COMPATIBILITY is enabled.
I recommend you not to use deprecated functions by enabling this option.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants