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

Compilation error due to the implementation of a missing virtual function #15

Open
Bzz2745 opened this issue Oct 20, 2024 · 6 comments
Open

Comments

@Bzz2745
Copy link

Bzz2745 commented Oct 20, 2024

Here is part of build error log :

In file included from /home/user/Project/G3Reg/src/back_end/ransac/ransac.cpp:10:
/home/user/Project/G3Reg/include/utils/opt_utils.h: In member function ‘virtual gtsam::NonlinearFactor::shared_ptr gtsam::Point2PointFactor::clone() const’:
/home/user/Project/G3Reg/include/utils/opt_utils.h:52:79: error: invalid new-expression of abstract class type ‘gtsam::Point2PointFactor’
52 | gtsam::NonlinearFactor::shared_ptr(new Point2PointFactor(*this)));
| ^
/home/user/Project/G3Reg/include/utils/opt_utils.h:29:11: note: because the following virtual functions are pure within ‘gtsam::Point2PointFactor’:
29 | class Point2PointFactor : public NoiseModelFactor1
| ^~~~~~~~~~~~~~~~~
In file included from /home/user/Project/G3Reg/include/utils/opt_utils.h:11:
/usr/local/include/gtsam/nonlinear/NonlinearFactor.h:639:18: note: ‘gtsam::Vector gtsam::NoiseModelFactorN::evaluateError(const ValueTypes& ..., OptionalMatrixTypeT...) const [with ValueTypes = {gtsam::Pose3}; gtsam::Vector = Eigen::Matrix<double, -1, 1>]’
639 | virtual Vector evaluateError(const ValueTypes&... x,

What should I do to solve this ?

@qiaozhijian
Copy link
Member

What's your GTSAM version?

@qiaozhijian
Copy link
Member

Did you use the version that I recommanded in README?

@Bzz2745
Copy link
Author

Bzz2745 commented Oct 21, 2024

What's your GTSAM version?

I used the master branch of GTSAM , igraph 0.9.9

@qiaozhijian
Copy link
Member

What's your GTSAM version?

I used the master branch of GTSAM , igraph 0.9.9

Try GTSAM-v4.2 please

@Bzz2745
Copy link
Author

Bzz2745 commented Oct 21, 2024

What's your GTSAM version?

I used the master branch of GTSAM , igraph 0.9.9

Try GTSAM-v4.2 please

Do you mean I should use the source.zip of version 4.2 in release ?

@qiaozhijian
Copy link
Member

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

2 participants