我在编译第三方库pcl和opencv的代码时,已经可以正常编译了,但是就是没有这两个库的代码提示,c++的代码提示倒是有,一涉及到pcl和opencv的代码提示就没有,望各位帮忙解决
我主要也不知道问题出在什么地方,我如果各位知道问题可能出在什么地方可以问我要更多我配置上的文件,我看见了就回复。
这是有代码提示的样子
这是没有代码提示的意思
这是我的c_cpp_properties.json的配置
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**",
"${workspaceFolder}",
"/usr/local/include/pcl-1.14",
"/usr/include",
"/usr/local/include/opencv4",
"/usr/local/include/vtk-9.3",
"/usr/include/libqhull",
"/usr/include/flann",
"/usr/include/boost",
"/usr/include/eigen3",
"/usr/include/eigen3/Eigen/",
"/usr/include/x86_64-linux-gnu/sys"
],
"defines": [],
"compilerPath": "/usr/bin/clang-14",
"cStandard": "c17",
"cppStandard": "c++14",
"intelliSenseMode": "linux-clang-x64"
}
],
"version": 4
}
这是我tasks.json的配置
{
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: g++ 生成活动文件",
"command": "/usr/bin/g++",
"args": [
"-fdiagnostics-color=always",
"-g",
//"${file}",
"-o",
"${fileDirname}/${fileBasenameNoExtension}",
"-I", "${workspaceFolder}/include", // 项目include文件
"-I", "$/usr/local/include/opencv4", // opencv安装的include文件路径
"-I", "$/usr/local/include/opencv4/opencv2",
"-L", "$/usr/local/lib", //opencv安装的lib文件路径
"-l", "opencv_core", //.so文件,文件原名称“libopencv_core.so”,注意需去除“lib”
"-l", "opencv_imgproc",
"-l", "opencv_imgcodecs",
"-l", "opencv_video",
"-l", "opencv_ml",
"-l", "opencv_highgui",
"-l", "opencv_objdetect",
"-l", "opencv_flann",
"-l", "opencv_imgcodecs",
"-l", "opencv_photo",
"-l", "opencv_videoio",
"-I","/usr/local/include/pcl-1.14",
"-I","/usr/include/eigen3",
"-I","/usr/local/include/vtk-9.3",
"-I","/usr/include/libqhull",
"-I","/usr/include/flann",
"-I","/usr/include/boost",
"-L","/usr/local/lib",
"-l","pcl_io",
"-l","pcl_visualization",
"-l","pcl_common",
// "-l","vtkFiltering",
// "-l","vtkCommon",
// "-l","vtkRendering",
// "-l","vtkGraphics",
"-l","vtkFiltersCore-9.3",
"-l","vtksys-9.3",
"-l","vtkCommonCore-9.3",
"-l","vtkRenderingCore-9.3",
"-l","vtkGeovisCore-9.3",
"-I","/usr/include/x86_64-linux-gnu",
"-l","boost_system",
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "调试器生成的任务。"
}
],
"version": "2.0.0"
}