LNK2019 error while building PCL 1.7.2 and PCL1.8

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

LNK2019 error while building PCL 1.7.2 and PCL1.8

ziqB
This post has NOT been accepted by the mailing list yet.
Hi
I'm currently trying to build PCL so that i can use RTABmaps
I ran into some issues while trying to build the PCL 1.7.2 using the command line to configure it and then build it. I'm using CMake 3.9 and Visual Studios 10 2010 to build the PCL from source. I have already downloaded the dependencies from this link and followed the instructions from this link to build the PCL from source.

The build failed and the following errors were shown:

"C:\Users\takrit\Downloads\pcl-pcl-1.7.2\build\install.vcxproj" (default target
) (1) ->
"C:\Users\takrit\Downloads\pcl-pcl-1.7.2\build\ALL_BUILD.vcxproj" (default targ
et) (3) ->
"C:\Users\takrit\Downloads\pcl-pcl-1.7.2\build\tools\pcl_add_gaussian_noise.vcx
proj" (default target) (4) ->
"C:\Users\takrit\Downloads\pcl-pcl-1.7.2\build\common\pcl_common.vcxproj" (defa
ult target) (5) ->
(Link target) ->
  time_trigger.obj : error LNK2019: unresolved external symbol "bool __cdecl bo
ost::this_thread::interruptible_wait(void *,struct boost::detail::timeout)" (?i
nterruptible_wait@this_thread@boost@@YA_NPAXUtimeout@detail@2@@Z) referenced in
 function "public: bool __thiscall boost::detail::basic_cv_list_entry::wait(str
uct boost::detail::timeout)" (?wait@basic_cv_list_entry@detail@boost@@QAE_NUtim
eout@23@@Z) [C:\Users\takrit\Downloads\pcl-pcl-1.7.2\build\common\pcl_common.vc
xproj]
  time_trigger.obj : error LNK2019: unresolved external symbol "public: void __
thiscall boost::thread::detach(void)" (?detach@thread@boost@@QAEXXZ) referenced
 in function "public: __thiscall boost::thread::~thread(void)" (??1thread@boost
@@QAE@XZ) [C:\Users\takrit\Downloads\pcl-pcl-1.7.2\build\common\pcl_common.vcxp
roj]
  time_trigger.obj : error LNK2019: unresolved external symbol "class boost::sy
stem::error_category const & __cdecl boost::system::system_category(void)" (?sy
stem_category@system@boost@@YAABVerror_category@12@XZ) referenced in function "
public: __thiscall boost::thread_exception::thread_exception(int,char const *)"
 (??0thread_exception@boost@@QAE@HPBD@Z) [C:\Users\takrit\Downloads\pcl-pcl-1.7
.2\build\common\pcl_common.vcxproj]
  time_trigger.obj : error LNK2019: unresolved external symbol "public: void __
thiscall boost::thread::join(void)" (?join@thread@boost@@QAEXXZ) referenced in
function "public: __thiscall pcl::TimeTrigger::~TimeTrigger(void)" (??1TimeTrig
ger@pcl@@QAE@XZ) [C:\Users\takrit\Downloads\pcl-pcl-1.7.2\build\common\pcl_comm
on.vcxproj]
  time_trigger.obj : error LNK2019: unresolved external symbol "private: void _
_thiscall boost::thread::start_thread(void)" (?start_thread@thread@boost@@AAEXX
Z) referenced in function "public: __thiscall boost::thread::thread<class boost
::_bi::bind_t<void,class boost::_mfi::mf0<void,class pcl::TimeTrigger>,class bo
ost::_bi::list1<class boost::_bi::value<class pcl::TimeTrigger *> > > >(class b
oost::_bi::bind_t<void,class boost::_mfi::mf0<void,class pcl::TimeTrigger>,clas
s boost::_bi::list1<class boost::_bi::value<class pcl::TimeTrigger *> > > &&,st
ruct boost::thread::dummy *)" (??$?0V?$bind_t@XV?$mf0@XVTimeTrigger@pcl@@@_mfi@
boost@@V?$list1@V?$value@PAVTimeTrigger@pcl@@@_bi@boost@@@_bi@3@@_bi@boost@@@th
read@boost@@QAE@$$QAV?$bind_t@XV?$mf0@XVTimeTrigger@pcl@@@_mfi@boost@@V?$list1@
V?$value@PAVTimeTrigger@pcl@@@_bi@boost@@@_bi@3@@_bi@1@PAUdummy@01@@Z) [C:\User
s\takrit\Downloads\pcl-pcl-1.7.2\build\common\pcl_common.vcxproj]
  time_trigger.obj : error LNK2019: unresolved external symbol "public: __thisc
all boost::thread::thread(void)" (??0thread@boost@@QAE@XZ) referenced in functi
on "public: __thiscall pcl::TimeTrigger::TimeTrigger(double,class boost::functi
on<void __cdecl(void)> const &)" (??0TimeTrigger@pcl@@QAE@NABV?$function@$$A6AX
XZ@boost@@@Z) [C:\Users\takrit\Downloads\pcl-pcl-1.7.2\build\common\pcl_common.
vcxproj]
  time_trigger.obj : error LNK2019: unresolved external symbol "class boost::sy
stem::error_category const & __cdecl boost::system::generic_category(void)" (?g
eneric_category@system@boost@@YAABVerror_category@12@XZ) referenced in function
 "void __cdecl boost::system::`dynamic initializer for 'posix_category''(void)"
 (??__Eposix_category@system@boost@@YAXXZ) [C:\Users\takrit\Downloads\pcl-pcl-1
.7.2\build\common\pcl_common.vcxproj]
  C:\Users\takrit\Downloads\pcl-pcl-1.7.2\build\bin\pcl_common_release.dll : fa
tal error LNK1120: 7 unresolved externals [C:\Users\takrit\Downloads\pcl-pcl-1.
7.2\build\common\pcl_common.vcxproj]


"C:\Users\takrit\Downloads\pcl-pcl-1.7.2\build\install.vcxproj" (default target
) (1) ->
"C:\Users\takrit\Downloads\pcl-pcl-1.7.2\build\ALL_BUILD.vcxproj" (default targ
et) (3) ->
"C:\Users\takrit\Downloads\pcl-pcl-1.7.2\build\tools\pcl_add_gaussian_noise.vcx
proj" (default target) (4) ->
"C:\Users\takrit\Downloads\pcl-pcl-1.7.2\build\io\pcl_io.vcxproj" (default targ
et) (6) ->
"C:\Users\takrit\Downloads\pcl-pcl-1.7.2\build\io\pcl_io_ply.vcxproj" (default
target) (7) ->
  ply_parser.obj : error LNK2019: unresolved external symbol "class boost::syst
em::error_category const & __cdecl boost::system::system_category(void)" (?syst
em_category@system@boost@@YAABVerror_category@12@XZ) referenced in function "pu
blic: __thiscall boost::thread_exception::thread_exception(int,char const *)" (
??0thread_exception@boost@@QAE@HPBD@Z) [C:\Users\takrit\Downloads\pcl-pcl-1.7.2
\build\io\pcl_io_ply.vcxproj]
  ply_parser.obj : error LNK2019: unresolved external symbol "class boost::syst
em::error_category const & __cdecl boost::system::generic_category(void)" (?gen
eric_category@system@boost@@YAABVerror_category@12@XZ) referenced in function "
void __cdecl boost::system::`dynamic initializer for 'posix_category''(void)" (
??__Eposix_category@system@boost@@YAXXZ) [C:\Users\takrit\Downloads\pcl-pcl-1.7
.2\build\io\pcl_io_ply.vcxproj]
  C:\Users\takrit\Downloads\pcl-pcl-1.7.2\build\bin\pcl_io_ply_release.dll : fa
tal error LNK1120: 2 unresolved externals [C:\Users\takrit\Downloads\pcl-pcl-1.
7.2\build\io\pcl_io_ply.vcxproj]
 
I thought it could be because of the version so i tried anoher version :PCL 1.8. However the same results happened.

I did some research on the error LNK2019 and it says that the linker can't find a matching definition for an external symbol in any of the link files. I saw the tutorial that shows how to build it from source using the CMake Gui but am not ableto solve the problems.

I did some more research and found that this issue has been solved before but the answer to it is too vague for me to understand. it says that there was a mismatch error in between PCL 1.8.0 and 1.6.0 ,and the mismatch was in choosing the Dependencies version of Boost, eigen, flann, OpenNI and VTK 5.8.0.
How do i resolve this error

I hope someone could help me

Thanks in advance