/usr/bin/ld: /tmp/ccOaO3xv.o: in function main': /home/lenovo/桌面/vscode/1/main.cpp:23: undefined reference to
ceres::Problem::Problem()'
/usr/bin/ld: /home/lenovo/桌面/vscode/1/main.cpp:32: undefined reference to ceres::Solve(ceres::Solver::Options const&, ceres::Problem*, ceres::Solver::Summary*)' /usr/bin/ld: /home/lenovo/桌面/vscode/1/main.cpp:33: undefined reference to
ceres::Solver::Summary::BriefReport const'
/usr/bin/ld: /home/lenovo/桌面/vscode/1/main.cpp:38: undefined reference to ceres::Problem::~Problem()' /usr/bin/ld: /home/lenovo/桌面/vscode/1/main.cpp:38: undefined reference to
ceres::Problem::Problem()'SizedCostFunction()':
/usr/bin/ld: /tmp/ccOaO3xv.o: in function `ceres::SizedCostFunction<1, 1>::
/usr/local/include/ceres/sized_cost_function.h:49: undefined reference to ceres::CostFunction::~CostFunction()' /usr/bin/ld: /tmp/ccOaO3xv.o: in function
ceres::internal::ResidualBlock* ceres::Problem::AddResidualBlock<>(ceres::CostFunction*, ceres::LossFunction*, double*)':
/usr/local/include/ceres/problem.h:250: undefined reference to ceres::Problem::AddResidualBlock(ceres::CostFunction*, ceres::LossFunction*, double* const*, int)' /usr/bin/ld: /tmp/ccOaO3xv.o: in function
ceres::SizedCostFunction<1, 1>::SizedCostFunction()':
/usr/local/include/ceres/sized_cost_function.h:59: undefined reference to ceres::CostFunction::CostFunction()' /usr/bin/ld: /usr/local/include/ceres/sized_cost_function.h:62: undefined reference to
ceres::CostFunction::~CostFunction()'
/usr/bin/ld: /tmp/ccOaO3xv.o:(.data.rel.ro._ZTIN5ceres17SizedCostFunctionILi1EJLi1EEEE[_ZTIN5ceres17SizedCostFunctionILi1EJLi1EEEE]+0x10): undefined reference to typeinfo for ceres::CostFunction' collect2: error: ld returned 1 exit status 终端进程“/usr/bin/bash '-c', '/usr/bin/g++ -fdiagnostics-color=always -g /home/lenovo/桌面/vscode/1/main.cpp -o /home/lenovo/桌面/vscode/1/main.out
pkg-config --cflags opencv --libs` -I /usr/local/include/opencv -I /usr/local/include/opencv2 -L /usr/local/lib -I opencv_core -I opencv_imgproc -I opencv_imgcodecs -I opencv_video -I opencv_ml -I opencv_highgui -I opecv_obdetect -I opencv_flann -I opencv_imgcodecs -I opencv_photo -I opencv_videoio -l gflags -l glog -I /usr/local/include/ceres'”已终止,退出代码: 1。
/usr/bin/ld: /tmp/cca791yM.o: in function main': /home/lenovo/desk/vscode/1/main.cpp:23: undefined reference to
ceres::Problem::Problem()'
/usr/bin/ld: /home/lenovo/desk/vscode/1/main.cpp:25: undefined reference to ceres::Problem::AddResidualBlock(ceres::CostFunction*, ceres::LossFunction*, double*)' /usr/bin/ld: /home/lenovo/desk/vscode/1/main.cpp:31: undefined reference to
ceres::Solver::Summary::Summary()'
/usr/bin/ld: /home/lenovo/desk/vscode/1/main.cpp:32: undefined reference to ceres::Solve(ceres::Solver::Options const&, ceres::Problem*, ceres::Solver::Summary*)' 现在报错 /usr/bin/ld: /home/lenovo/desk/vscode/1/main.cpp:33: undefined reference to
ceres::Solver::Summary::BriefReport const'
/usr/bin/ld: /home/lenovo/desk/vscode/1/main.cpp:37: undefined reference to ceres::Problem::~Problem()' /usr/bin/ld: /home/lenovo/desk/vscode/1/main.cpp:37: undefined reference to
ceres::Problem::~Problem()'
collect2: error: ld returned 1 exit status
终端进程“/usr/bin/bash '-c', '/usr/bin/g++ -fdiagnostics-color=always -g /home/lenovo/desk/vscode/1/main.cpp -o /home/lenovo/desk/vscode/1/main.out pkg-config --cflags opencv --libs
-I /usr/local/include/opencv -I /usr/local/include/opencv2 -L /usr/local/lib -I opencv_core -I opencv_imgproc -I opencv_imgcodecs -I opencv_video -I opencv_ml -I opencv_highgui -I opecv_obdetect -I opencv_flann -I opencv_imgcodecs -I opencv_photo -I opencv_videoio -l gflags -l glog -I /usr/local/include/ceres -I /usr/lib/x86_64-linux-gnu'”已终止,退出代码: 1。
文件的main函数有没有问题
你把launch.json文件发我一下