AndreiBarsan / DynSLAM

Master's Thesis on Simultaneous Localization and Mapping in dynamic environments. Separately reconstructs both the static environment and the dynamic objects from it, such as cars.
BSD 3-Clause "New" or "Revised" License
578 stars 178 forks source link

Link error....how to include pthread #37

Closed rnunziata closed 7 years ago

rnunziata commented 7 years ago

Link error....how to include pthread . Can someone help

[ 84%] Linking CXX executable InfiniTAM
/usr/bin/ld: ITMLib/libITMLib.a(ITMMainEngine.cpp.o): undefined reference to symbol 'pthread_create@@GLIBC_2.2.5'
/lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
src/InfiniTAM/InfiniTAM/CMakeFiles/InfiniTAM_cli.dir/build.make:110: recipe for target 'src/InfiniTAM/InfiniTAM/InfiniTAM_cli' failed
make[2]: *** [src/InfiniTAM/InfiniTAM/InfiniTAM_cli] Error 1
CMakeFiles/Makefile2:873: recipe for target 'src/InfiniTAM/InfiniTAM/CMakeFiles/InfiniTAM_cli.dir/all' failed
make[1]: *** [src/InfiniTAM/InfiniTAM/CMakeFiles/InfiniTAM_cli.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
/usr/bin/ld: ITMLib/libITMLib.a(ITMMainEngine.cpp.o): undefined reference to symbol 'pthread_create@@GLIBC_2.2.5'
/lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
src/InfiniTAM/InfiniTAM/CMakeFiles/InfiniTAM.dir/build.make:110: recipe for target 'src/InfiniTAM/InfiniTAM/InfiniTAM' failed
make[2]: *** [src/InfiniTAM/InfiniTAM/InfiniTAM] Error 1
CMakeFiles/Makefile2:914: recipe for target 'src/InfiniTAM/InfiniTAM/CMakeFiles/InfiniTAM.dir/all' failed
make[1]: *** [src/InfiniTAM/InfiniTAM/CMakeFiles/InfiniTAM.dir/all] Error 2
[100%] Built target DynSLAMGUI
Makefile:116: recipe for target 'all' failed
make: *** [all] Error 2
rnunziata commented 7 years ago

added -lpthread to InfinitTam CMakeLists ..

amiltonwong commented 6 years ago

Hi, @rnunziata ,

Could you elaborate how to modify the file DynSLAM/src/InfiniTAM/InfiniTAM/CMakeLists.txt to have the function (added -lpthread)?

THX!

rnunziata commented 6 years ago

around line 75 in CMakeList.txt

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")

On Mon, Nov 20, 2017 at 8:43 AM, amiltonwong notifications@github.com wrote:

Hi, @rnunziata https://github.com/rnunziata ,

Could you elaborate how to modify the file DynSLAM/src/InfiniTAM/ InfiniTAM/CMakeLists.txt to have the function (added -lpthread)?

THX!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/AndreiBarsan/DynSLAM/issues/37#issuecomment-345699001, or mute the thread https://github.com/notifications/unsubscribe-auth/AFIMMt1-UBOxaK6uTdl5VKmvsw4gpDKXks5s4YH_gaJpZM4PxmEE .

amiltonwong commented 6 years ago

Thanks @rnunziata

AndreiBarsan commented 6 years ago

Thanks for chiming in @rnunziata !!