Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build error #17

Open
hebaoy opened this issue Mar 23, 2022 · 8 comments
Open

build error #17

hebaoy opened this issue Mar 23, 2022 · 8 comments

Comments

@hebaoy
Copy link

hebaoy commented Mar 23, 2022

/home/xiaoheya/catkin_evo_ws/devel/lib/libdvs_mapping.so:undefined reference to‘cv::error(int, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, char const*, char const*, int)’
/home/xiaoheya/catkin_evo_ws/devel/lib/libdvs_mapping.so:undefined reference to‘cv::Mat::updateContinuityFlag()’
collect2: error: ld returned 1 exit status

@sherlie831
Copy link

I also encountered this problem. Have you solved it?

@zhaoliqun-7788
Copy link

Perhaps try to change the version of opencv from 4 to 3 ? I encountered this problem several days ago, but solved it successfully by changing the version of opencv~

@hebaoy
Copy link
Author

hebaoy commented Apr 2, 2022

Thanks! I'm successfully

@hebaoy
Copy link
Author

hebaoy commented Apr 2, 2022

but, I also,,,
/home/xiaoheya/catkin_evo_ws/src/rpg_dvs_evo_open/dvs_reconstruction/src/mosaic.cpp: In member function ‘void Mosaic::update(const cv::Mat&, const ros::Time&, const ros::Time&)’:
/home/xiaoheya/catkin_evo_ws/src/rpg_dvs_evo_open/dvs_reconstruction/src/mosaic.cpp:291:48: error: invalid initialization of reference of type ‘const Scalar& {aka const cv::Matx<float, 1, 1>&}’ from expression of type ‘const float’
const Scalar &z = new_grad.at(y, x);
~~~~~~~~~~~~~~~~~~^~~~~~
/home/xiaoheya/catkin_evo_ws/src/rpg_dvs_evo_open/dvs_reconstruction/src/mosaic.cpp:314:35: error: conversion from ‘float’ to non-scalar type ‘const Scalar {aka const cv::Matx<float, 1, 1>}’ requested
const Scalar h = g.dot(v), nu = z - h, S = dhdg * P * dhdg.t() + R_;

@thomaswxu
Copy link

Which version of opencv 3 are you using? I tried with the latest opencv3 version but still got many build errors related to opencv functions when trying to catkin build dvs_tracking

@hebaoy
Copy link
Author

hebaoy commented Apr 10, 2022

i used in opencv3.4.16

@munirjojoverge
Copy link

Hi. I have exactly the same problem and I've tried many approaches, but none of them successful. I started by changing the opencv version to 3.14, I added to the CmakeList the requirement to make sure all pieces of the repo were using the same opencv version. The problem @hebaoy had I solved it by using uniform initialization (aka {} instead of =). But I still have linking issues. To address this ld issues I added to the CMakeList specific paths to find the opencv libraries and where the target libraries should go, but I haven't been successful.
For completeness: Ubuntu 18.04, ROS Melodic, opencv from repo checkout branch 3.14 and built, also installed open_contrib on the same branch. I'll post the exact failure messages shortly. I'd love to get some ideas on how to address this.

@msh003
Copy link

msh003 commented Nov 17, 2023

Hi. I have exactly the same problem and I've tried many approaches, but none of them successful. I started by changing the opencv version to 3.14, I added to the CmakeList the requirement to make sure all pieces of the repo were using the same opencv version. The problem @hebaoy had I solved it by using uniform initialization (aka {} instead of =). But I still have linking issues. To address this ld issues I added to the CMakeList specific paths to find the opencv libraries and where the target libraries should go, but I haven't been successful. For completeness: Ubuntu 18.04, ROS Melodic, opencv from repo checkout branch 3.14 and built, also installed open_contrib on the same branch. I'll post the exact failure messages shortly. I'd love to get some ideas on how to address this.

Could you please clarify how to solved the problem by using uniform initialization (aka {} instead of =)?
Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants