如何解决“无法打开'raise.c'"错误?(VSCODE,LINUX) [英] How can I solve "Unable to open 'raise.c' " Error?(VSCODE , LINUX)
问题描述
(操作系统和版本:Ubuntu 18.4,VS代码版本:Vscode 1.4,C/C ++扩展版本:0.26)
( OS and Version: Ubuntu 18.4 , VS Code Version: Vscode 1.4 ,C/C++ Extension Version:0.26)
您好,我已经阅读了有关"raise.c"的所有文章,但都没有解决我的问题,我只是编写了一个简单的OpenCV代码来捕获网络摄像头的帧.每次我运行代码时,它经常显示错误.错误消息是:
Hello, I have read all the articles about "raise.c" and none of them solved my problem, I just wrote a simple OpenCV code which captures webcam's frames. each time I run my code it frequently shows an error. the error message is:
无法打开'raise.c':无法读取文件(错误:未找到文件(/build/glibc-OTsEL5/glibc-2.27/sysdeps/unix/sysv/linux/raise.c)).
Unable to open 'raise.c': Unable to read file (Error: File not found (/build/glibc-OTsEL5/glibc-2.27/sysdeps/unix/sysv/linux/raise.c)).
launch.json是:
launch.json is:
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "g++ build and debug active file",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}/${fileBasenameNoExtension}",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "g++ build active file",
"miDebuggerPath": "/usr/bin/gdb"
}
]
}
和tasks.json是:
and tasks.json is:
{
"tasks": [
{
"type": "shell",
"label": "g++ build active file",
"command": "/usr/bin/g++",
"args": [
"-g",
"${file}",
"-o",
"${fileDirname}/${fileBasenameNoExtension}",
"`pkg-config",
"--libs",
"--cflags",
"opencv4`"
],
"options": {
"cwd": "/usr/bin"
}
}
],
"version": "2.0.0"
}
那么我该如何解决这个问题?有什么办法解决它.我是初学者程序员.
So How can I solve this problem? is there any way to solve it. I am a beginner programmer.
第二个问题是每次我运行此代码时,我的网络摄像头都会冻结,而我必须使用强制相当"的底部.为什么我的网络摄像头死机了?任何想法都欢迎.谢谢. (我正在使用ubuntu,而我的IDE是Vscode)
and the second problem is each time I run this code my webcam freezes and I have to use "force quite "bottom. why my webcam freezes? any ideas are welcome. thanks. (I am using ubuntu and my IDE is Vscode )
推荐答案
最后,我在工作3天后找到了解决方案.我将为下一代编写解决方案.没有必要在互联网上搜索,您什么都找不到:D 好吧,如果您想解决问题,则需要再次重新安装OpenCV并关闭所有标志.这是一个错误. 我使用的标志是:
Finally, I found the solution after 3 days of working. I am going to write a solution for next generation. there is no need to search on internet you can't find anything :D okay if u wanna solve the problem u need to reinstall OpenCV again and turn all flags off. it's a bug. the flags which I used for are:
cmake -D BUILD_TIFF = ON -D WITH_CUDA = OFF -D ENABLE_AVX = OFF -D WITH_OPENGL =打开-D WITH_OPENCL =关闭-D WITH_IPP =关闭-D WITH_TBB =打开-D BUILD_TBB = ON -D WITH_EIGEN = OFF -D WITH_V4L = OFF -D WITH_VTK = OFF -D BUILD_TESTS = OFF -D BUILD_PERF_TESTS = OFF -D CMAKE_BUILD_TYPE =发布-D CMAKE_INSTALL_PREFIX =/usr/local -D OPENCV_EXTRA_MODULES_PATH =./../opencv_contrib/modules ..
cmake -D BUILD_TIFF=ON -D WITH_CUDA=OFF -D ENABLE_AVX=OFF -D WITH_OPENGL=ON -D WITH_OPENCL=OFF -D WITH_IPP=OFF -D WITH_TBB=ON -D BUILD_TBB=ON -D WITH_EIGEN=OFF -D WITH_V4L=OFF -D WITH_VTK=OFF -D BUILD_TESTS=OFF -D BUILD_PERF_TESTS=OFF -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D OPENCV_EXTRA_MODULES_PATH=./../opencv_contrib/modules ..
使用正确的路径填充OPENCV_EXTRA_MODULES_PATH和CMAKE_INSTALL_PREFIX =/usr/local! 就这样, 祝你好运.
fill OPENCV_EXTRA_MODULES_PATH and CMAKE_INSTALL_PREFIX=/usr/local with the correct path! that's all, good luck.
这篇关于如何解决“无法打开'raise.c'"错误?(VSCODE,LINUX)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!