Undefined symbols for architecture x86_64:
"KeyValue::KeyValue()", referenced from:
Mapper::map() in Mapper.o
"KeyValueList::KeyValueList()", referenced from:
QuickSort::group() in QuickSort.o
"KeyValueList::~KeyValueList()", referenced from:
QuickSort::group() in QuickSort.o
std::vector<KeyValueList, std::allocator<KeyValueList> >::_M_insert_aux(__gnu_cxx::__normal_iterator<KeyValueList*, std::vector<KeyValueList, std::allocator<KeyValueList> > >, KeyValueList const&) in QuickSort.o
void std::_Destroy<KeyValueList>(KeyValueList*) in QuickSort.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
有我的代码中没有其他错误,我已经1个警告说:编译器错误我从未见过有人可以帮我理解它吗?
Implicit conversion loses integer precision: 'unsigned long' to 'int'
,我不认为会导致连接错误...有人能帮助我了解这个错误是什么,它是如何发生的?
如果需要,我可以提供一些代码。
请显示“KeyValue”类的定义。有几种常见的错误会导致这种综合征,但是我不能看到你的代码中的哪一个是错误的。 – zwol 2012-02-20 20:00:23
这些是_linker_错误,而不是编译器错误。 – ildjarn 2012-02-20 20:01:13
也许你忘了执行这些功能。也许你忘了将相关的.obj链接到你的可执行文件中。也许别的东西。为了找出答案,删除你的程序的某些部分,直到A)你修复它,或者B)你有一个足够小的程序在这里复制粘贴。请参阅http://sscce.org/。 – 2012-02-20 20:01:17