/usr/include/c++/7/cstdlib:75:15: fatal error: stdlib.h: No such file or directory
这里写自定义目录标题
Ubuntu 18.04编译opencv-3.2.0时出现如下错误:
原因分析:
解决方法:
Ubuntu 18.04编译opencv-3.2.0时出现如下错误:
[ 20%] Generating precomp.hpp.gch/opencv_viz_Release.gch
In file included from /usr/include/c++/7/ext/string_conversions.h:41:0,
from /usr/include/c++/7/bits/basic_string.h:6361,
from /usr/include/c++/7/string:52,
from /usr/include/c++/7/stdexcept:39,
from /usr/include/c++/7/array:39,
from /usr/include/c++/7/tuple:39,
from /usr/include/c++/7/bits/stl_map.h:63,
from /usr/include/c++/7/map:61,
from /home/hri/MyInstallSoftware/opencv-3.2.0/build/modules/viz/precomp.hpp:49:
/usr/include/c++/7/cstdlib:75:15: fatal error: stdlib.h: No such file or directory
#include_next <stdlib.h>
^~~~~~~~~~
compilation terminated.
modules/viz/CMakeFiles/pch_Generate_opencv_viz.dir/build.make:62: recipe for target 'modules/viz/precomp.hpp.gch/opencv_viz_Release.gch' failed
make[2]: *** [modules/viz/precomp.hpp.gch/opencv_viz_Release.gch] Error 1
CMakeFiles/Makefile2:3122: recipe for target 'modules/viz/CMakeFiles/pch_Generate_opencv_viz.dir/all' failed
make[1]: *** [modules/viz/CMakeFiles/pch_Generate_opencv_viz.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
final Handler handler = new Handler();
LOG.d("delay");
handler.postDelayed(new Runnable() {
@Override public void run() {
LOG.d("notify!");
//calling some methods here
}
}, 2000);
This method is invoked on the worker thread with a request to process.Only one Intent is processed at a time, but the processing happens on a worker thread that runs independently from other application logic. So, if this code takes a long time, it will hold up other requests to the same IntentService, but it will not hold up anything else. When all requests have been handled, the IntentService stops itself, so you should not call stopSelf.
HandlerThread handlerThread = new HandlerThread("background-thread");
handlerThread.start();
final Handler handler = new Handler(handlerThread.getLooper());
handler.postDelayed(new Runnable() {
@Override public void run() {
LOG.d("notify!");
// call some methods here
// make sure to finish the thread to avoid leaking memory
handlerThread.quitSafely();
}
}, 2000);
或者您可以使用Thread.sleep(long millis).
try {
Thread.sleep(2000);
// call some methods here
} catch (InterruptedException e) {
e.printstacktrace();
}
如果要停止休眠线程,请使用yourThread.interrupt();
我们今天的关于"std::endl" 与 "
"的分享已经告一段落,感谢您的关注,如果您想了解更多关于/usr/include/c++/7/cstdlib:75:15: fatal error: stdlib.h: No such file or directory、Android Handler.postDelayed()方法、android – Handler.postDelayed(Runnable)vs CountdownTimer、android – handler.postDelayed在IntentService的onHandleIntent方法中不起作用的相关信息,请在本站查询。