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

Cannot compile, issue on linking #8

Open
archenroot opened this issue Jun 7, 2019 · 2 comments
Open

Cannot compile, issue on linking #8

archenroot opened this issue Jun 7, 2019 · 2 comments

Comments

@archenroot
Copy link

I am on Gentoo system and had to manually copy eigen and sophus dirs into src, no make continues, but in the very end when linking executable I get:

cc1plus: warning: unrecognized command line option ‘-Wno-deprecated-register’
[100%] Linking CXX executable ../bin/flame_test
/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: CMakeFiles/flame_test.dir/stereo/epipolar_geometry_test.cc.o: in function `__static_initialization_and_destruction_0(int, int) [clone .constprop.340]':
epipolar_geometry_test.cc:(.text.startup+0x25e): undefined reference to `testing::internal::MakeAndRegisterTestInfo(char const*, char const*, char const*, char const*, testing::internal::CodeLocation, void const*, void (*)(), void (*)(), testing::internal::TestFactoryBase*)'
/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: epipolar_geometry_test.cc:(.text.startup+0x307): undefined reference to `testing::internal::MakeAndRegisterTestInfo(char const*, char const*, char const*, char const*, testing::internal::CodeLocation, void const*, void (*)(), void (*)(), testing::internal::TestFactoryBase*)'
/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: epipolar_geometry_test.cc:(.text.startup+0x3af): undefined reference to `testing::internal::MakeAndRegisterTestInfo(char const*, char const*, char const*, char const*, testing::internal::CodeLocation, void const*, void (*)(), void (*)(), testing::internal::TestFactoryBase*)'
/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: epipolar_geometry_test.cc:(.text.startup+0x457): undefined reference to `testing::internal::MakeAndRegisterTestInfo(char const*, char const*, char const*, char const*, testing::internal::CodeLocation, void const*, void (*)(), void (*)(), testing::internal::TestFactoryBase*)'
/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: epipolar_geometry_test.cc:(.text.startup+0x4ff): undefined reference to `testing::internal::MakeAndRegisterTestInfo(char const*, char const*, char const*, char const*, testing::internal::CodeLocation, void const*, void (*)(), void (*)(), testing::internal::TestFactoryBase*)'
/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: CMakeFiles/flame_test.dir/stereo/epipolar_geometry_test.cc.o:epipolar_geometry_test.cc:(.text.startup+0x5a7): more undefined references to `testing::internal::MakeAndRegisterTestInfo(char const*, char const*, char const*, char const*, testing::internal::CodeLocation, void const*, void (*)(), void (*)(), testing::internal::TestFactoryBase*)' follow
collect2: error: ld returned 1 exit status
make[2]: *** [test/CMakeFiles/flame_test.dir/build.make:183: bin/flame_test] Error 1
make[1]: *** [CMakeFiles/Makefile2:146: test/CMakeFiles/flame_test.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

Also note I have GCC 8, should I use lower version or its different kind of error?

@archenroot
Copy link
Author

Also note I have dev-cpp/gtest-1.8.*, I will try to downgrade to 1.7

@yrq0208
Copy link

yrq0208 commented Oct 9, 2020

Hi @archenroot,

Have you solved this issue? If so, could you please share what you have done? I might have encountered the same issue as you did, here are the errors I have,

[100%] Linking CXX executable ../bin/flame_test
CMakeFiles/flame_test.dir/stereo/epipolar_geometry_test.cc.o: In function __static_initialization_and_destruction_0(int, int) [clone .constprop.643]': epipolar_geometry_test.cc:(.text.startup+0x17d): undefined reference to testing::internal::MakeAndRegisterTestInfo(char const*, char const*, char const*, char const*, testing::internal::CodeLocation, void const*, void ()(), void ()(), testing::internal::TestFactoryBase*)'
epipolar_geometry_test.cc:(.text.startup+0x249): undefined reference to testing::internal::MakeAndRegisterTestInfo(char const*, char const*, char const*, char const*, testing::internal::CodeLocation, void const*, void (*)(), void (*)(), testing::internal::TestFactoryBase*)' epipolar_geometry_test.cc:(.text.startup+0x314): undefined reference to testing::internal::MakeAndRegisterTestInfo(char const*, char const*, char const*, char const*, testing::internal::CodeLocation, void const*, void ()(), void ()(), testing::internal::TestFactoryBase*)'
epipolar_geometry_test.cc:(.text.startup+0x3df): undefined reference to testing::internal::MakeAndRegisterTestInfo(char const*, char const*, char const*, char const*, testing::internal::CodeLocation, void const*, void (*)(), void (*)(), testing::internal::TestFactoryBase*)' epipolar_geometry_test.cc:(.text.startup+0x4aa): undefined reference to testing::internal::MakeAndRegisterTestInfo(char const*, char const*, char const*, char const*, testing::internal::CodeLocation, void const*, void ()(), void ()(), testing::internal::TestFactoryBase*)'
CMakeFiles/flame_test.dir/stereo/epipolar_geometry_test.cc.o:epipolar_geometry_test.cc:(.text.startup+0x575): more undefined references to `testing::internal::MakeAndRegisterTestInfo(char const*, char const*, char const*, char const*, testing::internal::CodeLocation, void const*, void ()(), void ()(), testing::internal::TestFactoryBase*)' follow
collect2: error: ld returned 1 exit status
test/CMakeFiles/flame_test.dir/build.make:260: recipe for target 'bin/flame_test' failed
make[2]: *** [bin/flame_test] Error 1
CMakeFiles/Makefile2:140: recipe for target 'test/CMakeFiles/flame_test.dir/all' failed
make[1]: *** [test/CMakeFiles/flame_test.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

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