HPCE / hpce-2017-cw6

2 stars 17 forks source link

Undefined reference to 'tbb::xxxxxxxx' #29

Closed qszxluyu closed 6 years ago

qszxluyu commented 6 years ago

Error message when I am trying to use tbb::parallel_for: /usr/include/tbb/task.h:1014: undefined reference to `tbb::internal::allocate_continuation_proxy::allocate(unsigned long) const'

Error message when using tbb::taskgroup: /usr/include/tbb/task.h:450: undefined reference to `tbb::task_group_context::init()'

Head files are included, and an -ltbb flag is used in makefile. Same code succeed in compiling on an AWS instance. CW1-CW4 succeed in compiling on my machine. (Ubuntu 16.04 VMware) I've tried to reinstall the lib package.

Does anyone have an idea what could go wrong?

natoucs commented 6 years ago

Did you see the post about inverting Testlibs and ld libs in the closed issues ? Did you specify -ltbb as an LDLIBS (and not a CPPFLAG) ? The latter was a stupid error on my part that cost me quite some time

qszxluyu commented 6 years ago

Thank you, this is helpful, I didn't notice that closed case.