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

multi-definition error if build static libraries #351

Open
CanCanZeng opened this issue Jan 20, 2022 · 0 comments
Open

multi-definition error if build static libraries #351

CanCanZeng opened this issue Jan 20, 2022 · 0 comments

Comments

@CanCanZeng
Copy link

Hi, I build maplab (develop branch 483daf4) successfully on ubuntu16.04 and ubuntu20.04 under the guide of documents. But when I add some flag in compilation, catkin config --cmake-args -DBUILD_SHARED_LIBS=0 , there are some multi-definition error.

I figured out these problems and I would like to share the method(report maybe two bugs)

1.

the matching-based-engine.h includes matching-based-engine-inl.h here

, and matching-based-engine-inl.h includes matching-based-engine.h here , this can be fixed by including matching-based-engine-inl.h in matching-based-engine.cc

2. (maybe this problem should be reported under https://github.com/ethz-asl/aslam_cv2 , but I think report in here is OK)

you implement GyroTwoFrameMatcher::getKeypointIteratorsInWindow in .h file here https://github.com/ethz-asl/aslam_cv2/blob/a385593ccc6c4d0dcead618581817d203afc5d11/aslam_cv_matcher/include/aslam/matcher/gyro-two-frame-matcher.h#L196 , and includes gyro-two-frame-matcher.h file in both https://github.com/ethz-asl/aslam_cv2/blob/a385593ccc6c4d0dcead618581817d203afc5d11/aslam_cv_matcher/src/gyro-two-frame-matcher.cc#L1 and https://github.com/ethz-asl/aslam_cv2/blob/a385593ccc6c4d0dcead618581817d203afc5d11/aslam_cv_tracker/src/feature-tracker-gyro.cc#L8 , but both aslam_cv_matcher module and aslam_cv_tracker module are used by rovioli, so this will cause multi-definition. this can be fixed by moving the implementation of GyroTwoFrameMatcher::getKeypointIteratorsInWindow to gyro-two-frame-matcher.cc

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

1 participant