我正在尝试安装OpenGM库。但是,在使用CMake时,我收到以下错误:
fab.setOnTouchListener(new View.OnTouchListener() {
float startX;
int lastAction;
@Override
public boolean onTouch(View view, MotionEvent event) {
switch (event.getActionMasked()) {
case MotionEvent.ACTION_DOWN:
startX = view.getX() - event.getRawX();
lastAction = MotionEvent.ACTION_DOWN;
break;
case MotionEvent.ACTION_MOVE:
view.setX(event.getRawX() + startX);
lastAction = MotionEvent.ACTION_MOVE;
break;
case MotionEvent.ACTION_UP:
if (lastAction == MotionEvent.ACTION_DOWN){
edit();
}
break;
case MotionEvent.ACTION_BUTTON_PRESS:
default:
return false;
}
return true;
}
});
然而,当我这样做时:
CMake Error at /usr/local/share/cmake-3.6/Modules/FindBoost.cmake:1753 (message):
Unable to find the requested Boost libraries.
Boost version: 1.62.0
Boost include path: /usr/local/include
Could not find the following Boost libraries:
boost_thread
Some (but not all) of the required Boost libraries were found. You may
need to install these additional Boost libraries. Alternatively, set
BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT
to the location of Boost.
在
ls -l
我得到以下一行:
/usr/local/include
表明它看起来在正确的目录中。
在:
lrwxr-xr-x 1 Florian admin 36 13 oct 19:11 boost -> ../Cellar/boost/1.62.0/include/boost
我有:
/usr/local/lib
所以,似乎boost_thread库确实存在......
关于与Boost相关的CMake配置,我有:
libboost_thread-mt.a
libboost_thread-mt.dylib
如果它可以提供帮助,我在Mac OSX下并通过以下方式安装Boost:
Boost_DIR Boost_DIR-NOTFOUND
Boost_INCLUDE_DIR /usr/local/include
Boost_LIBRARY_DIR_DEBUG /usr/local/lib
Boost_LIBRARY_DIR_RELEASE /usr/local/lib
Boost_PYTHON_LIBRARY_DEBUG /usr/local/lib/libboost_python.dylib
Boost_PYTHON_LIBRARY_RELEASE /usr/local/lib/libboost_python.dylib
答案 0 :(得分:0)
我已设法通过将Boost多线程标志设置为ON n CMakeLists.txt来处理此错误。