[英]compiler error I've never seen could someone help me understand it?
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)
There's no other error in my code, I have 1 warning saying: 我的代码中没有其他错误,我有1条警告说:
Implicit conversion loses integer precision: 'unsigned long' to 'int'
which I don't think would cause a linking error... Could someone help me understand what this error is and how it may have happened? 我认为这不会导致链接错误...有人可以帮助我了解此错误是什么以及如何发生的吗?
I can provide some code if needed. 如果需要,我可以提供一些代码。
You're trying to link to some code that doesn't exist; 您正在尝试链接到一些不存在的代码。 or certainly not for x86_64. 或肯定不是x86_64。 Where is KeyValue()
defined ? KeyValue()
在哪里定义? - link to that. -链接到那个。
You probably included the header file for KeyValue in Mapper and Quicksort but didn't add the source for the compiler to deal with. 您可能在Mapper和Quicksort中包含了KeyValue的头文件,但没有为编译器添加要处理的源。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.