环境为VS2022,学习SLAM十四讲, 使用cmake进行编写
CMakeLists.txt内容
cmake_minimum_required (VERSION 3.8)
project ("ch5")
find_package( OpenCV REQUIRED )
include_directories( ${OpenCV_INCLUDE_DIRS} )
add_executable (imageBasics "imageBasics.cpp" )
target_link_libraries( imageBasics ${OpenCV_LIBS} )
imageBasics.cpp内容
#include <iostream>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
using namespace std;
int main(int argc, char** argv)
{
cv::Mat image;
image = cv::imread(argv[1]);
return 0;
因为是cmake编写的,所以无法通过VS的项目属性调整命令行输入参数(应该是吧?)
我需要在debug的时候传递参数给argv,请问有没有兄弟指导一下如何操作