[问题] Undefined reference, symbol error问题

楼主: henry8168 (番薯猴)   2016-03-22 14:15:23
开发平台(Platform): (Ex: VC++, GCC, Linux, ...)
CentOS
额外使用到的函数库(Library Used): (Ex: OpenGL, ...)
#include "tbb/concurrent_hash_map.h"
#include "tbb/blocked_range.h"
#include "tbb/parallel_for.h"
问题(Question):
跑的程式码如下
https://gist.github.com/anonymous/d4da3b91772e7418163e
我已经将tbb做成symbol link到
/usr/include
/usr/lib
/usr/lib64
这三个目录下了,但执行
g++ hashtabletest.cpp -o hashtabletest
后会吐出一大片错误画面,如下:


这怎么办才好?拜托大家救救我
喂入的资料(Input):
预期的正确结果(Expected Output):
错误结果(Wrong Output):
程式码(Code):(请善用置底文网页, 记得排版)
补充说明(Supplement):
作者: shadow0326 (非议)   2016-03-22 14:20:00
你要跟gcc讲要link谁呀参数加-l <lib_path>-l是接library档案,不是目录
作者: bibo9901 (function(){})()   2016-03-22 15:40:00
-L/path/to/lib/dir -ltbb意思是去 /path/to/lib/dir 找 libtbb.so

Links booklink

Contact Us: admin [ a t ] ucptt.com