我试图使用QT编译hello zed示例,而不使用cmake,这是我的代码:
#include <sl/Camera.hpp>
#include <opencv2/opencv.hpp>
using namespace std;
using namespace sl;
int main(int argc, char **argv) {
// Create a ZED camera object
Camera zed;
// Open the camera
ERROR_CODE returned_state = zed.open();
if (returned_state != ERROR_CODE::SUCCESS) {
std::cout << "Error " << returned_state << ", exit program.\n";
return EXIT_FAILURE;
}
// Get camera information (ZED serial number)
auto camera_infos = zed.getCameraInformation();
printf("Hello! This is my serial number: %d\n", camera_infos.serial_number);
// Close the camera
zed.close();
return EXIT_SUCCESS;
}我犯了太多这样的错误:
error: undefined reference to `sl::String::~String()'我知道问题在连接过程中,但我不知道我应该做什么
发布于 2021-12-28 12:25:26
TARGET_LINK_LIBRARIES(project_name ${ZED_LIBS})https://stackoverflow.com/questions/67108899
复制相似问题