You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm getting the following error while trying to build in arch-linux:
[ 4%] Linking CXX shared library lib/libvsr_shared.so
/usr/bin/cmake -E cmake_link_script CMakeFiles/vsr_shared.dir/link.txt --verbose=1
/usr/bin/c++ -fPIC -g -O3 -ftemplate-depth-1200 -Wno-switch -Wno-deprecated-declarations -Wno-int-to-pointer-cast -DVSR_PRECISION_DOUBLE -O2 -g -DNDEBUG -shared -Wl,-soname,libvsr_shared.so -o lib/libvsr_shared.so CMakeFiles/vsr_shared.dir/src/space/vsr_cga3D_cubicLattice.cpp.o CMakeFiles/vsr_shared.dir/src/space/vsr_cga3D_external_linkage.cpp.o CMakeFiles/vsr_shared.dir/src/space/vsr_cga3D_frame.cpp.o CMakeFiles/vsr_shared.dir/src/space/vsr_cga3D_op.cpp.o CMakeFiles/vsr_shared.dir/src/space/vsr_cga3D_round.cpp.o -L/home/francisco/git-repos/versor/build/lib
/usr/bin/ld: CMakeFiles/vsr_shared.dir/src/space/vsr_cga3D_frame.cpp.o:(.bss+0x0): multiple definition of `vsr::cga::pointsOnSphere'; CMakeFiles/vsr_shared.dir/src/space/vsr_cga3D_external_linkage.cpp.o:(.bss+0x0): first defined here
/usr/bin/ld: CMakeFiles/vsr_shared.dir/src/space/vsr_cga3D_frame.cpp.o:(.bss+0x1): multiple definition of `vsr::cga::pointOnSphere'; CMakeFiles/vsr_shared.dir/src/space/vsr_cga3D_external_linkage.cpp.o:(.bss+0x1): first defined here
/usr/bin/ld: CMakeFiles/vsr_shared.dir/src/space/vsr_cga3D_frame.cpp.o:(.bss+0x2): multiple definition of `vsr::cga::pairOnSphere'; CMakeFiles/vsr_shared.dir/src/space/vsr_cga3D_external_linkage.cpp.o:(.bss+0x2): first defined here
/usr/bin/ld: CMakeFiles/vsr_shared.dir/src/space/vsr_cga3D_frame.cpp.o:(.bss+0x3): multiple definition of `vsr::cga::pointsOnCircle'; CMakeFiles/vsr_shared.dir/src/space/vsr_cga3D_external_linkage.cpp.o:(.bss+0x3): first defined here
/usr/bin/ld: CMakeFiles/vsr_shared.dir/src/space/vsr_cga3D_frame.cpp.o:(.bss+0x4): multiple definition of `vsr::cga::pointOnCircle'; CMakeFiles/vsr_shared.dir/src/space/vsr_cga3D_external_linkage.cpp.o:(.bss+0x4): first defined here
/usr/bin/ld: CMakeFiles/vsr_shared.dir/src/space/vsr_cga3D_frame.cpp.o:(.bss+0x5): multiple definition of `vsr::cga::pointOnLine'; CMakeFiles/vsr_shared.dir/src/space/vsr_cga3D_external_linkage.cpp.o:(.bss+0x5): first defined here
/usr/bin/ld: CMakeFiles/vsr_shared.dir/src/space/vsr_cga3D_op.cpp.o:(.bss+0x0): multiple definition of `vsr::cga::pointsOnSphere'; CMakeFiles/vsr_shared.dir/src/space/vsr_cga3D_external_linkage.cpp.o:(.bss+0x0): first defined here
/usr/bin/ld: CMakeFiles/vsr_shared.dir/src/space/vsr_cga3D_op.cpp.o:(.bss+0x1): multiple definition of `vsr::cga::pointOnSphere'; CMakeFiles/vsr_shared.dir/src/space/vsr_cga3D_external_linkage.cpp.o:(.bss+0x1): first defined here
/usr/bin/ld: CMakeFiles/vsr_shared.dir/src/space/vsr_cga3D_op.cpp.o:(.bss+0x2): multiple definition of `vsr::cga::pairOnSphere'; CMakeFiles/vsr_shared.dir/src/space/vsr_cga3D_external_linkage.cpp.o:(.bss+0x2): first defined here
/usr/bin/ld: CMakeFiles/vsr_shared.dir/src/space/vsr_cga3D_op.cpp.o:(.bss+0x3): multiple definition of `vsr::cga::pointsOnCircle'; CMakeFiles/vsr_shared.dir/src/space/vsr_cga3D_external_linkage.cpp.o:(.bss+0x3): first defined here
/usr/bin/ld: CMakeFiles/vsr_shared.dir/src/space/vsr_cga3D_op.cpp.o:(.bss+0x4): multiple definition of `vsr::cga::pointOnCircle'; CMakeFiles/vsr_shared.dir/src/space/vsr_cga3D_external_linkage.cpp.o:(.bss+0x4): first defined here
/usr/bin/ld: CMakeFiles/vsr_shared.dir/src/space/vsr_cga3D_op.cpp.o:(.bss+0x5): multiple definition of `vsr::cga::pointOnLine'; CMakeFiles/vsr_shared.dir/src/space/vsr_cga3D_external_linkage.cpp.o:(.bss+0x5): first defined here
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/vsr_shared.dir/build.make:161: lib/libvsr_shared.so] Error 1
make[2]: Leaving directory '/home/francisco/git-repos/versor/build'
make[1]: *** [CMakeFiles/Makefile2:546: CMakeFiles/vsr_shared.dir/all] Error 2
make[1]: Leaving directory '/home/francisco/git-repos/versor/build'
make: *** [Makefile:146: all] Error 2
The text was updated successfully, but these errors were encountered:
Ok, in this h-file is a section with lamdas, defined with "auto" which has external linkage by default. To change it to local linkage just add "const" and you should be able to build the libraries. Example
auto pointsOnSphere ... => const auto pointsOnSphere ...
I'm getting the following error while trying to build in arch-linux:
The text was updated successfully, but these errors were encountered: