简体   繁体   English

我从未见过的编译器错误有人可以帮助我理解它吗?

[英]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.

相关问题 我已经解决了 Hackerrank 上的平衡括号,我遇到了这个错误……有人可以帮我理解这个吗? - I have solved Balanced Brackets on Hackerrank and i encountered this error… can someone help me understand this? 我正在尝试理解这两个代码块,有人可以帮忙吗? - I am trying to understand these 2 blocks of code, could someone help please? 有人可以帮我理解这些参数/参数吗? - Can someone help me understand these parameters/arguments? 有人可以帮我理解为什么我在这里遇到错误我相信这是因为约会单链表 - Can someone help me understand why im getting an error here I believe its because of the appointment singly linked list 我在C ++ 11中从未见过的代码 - Code I've never seen in C++11 我从未见过的C ++标志:| = - A sign in C++ I've never seen before: |= 有人可以帮助我吗? OOP 在 C++ - could someone help me? OOP in C++ 有人可以帮助我了解标签和 goto 函数的工作原理吗? - Can someone help me understand how labels and goto functions work? 有人可以帮我解决与操作员不匹配的错误吗 - Can someone help me for the error no match for operator 有人可以帮我理解stmdb,ldmia,以及如何用arm汇编语言实现这个C ++代码? - Can someone help me understand stmdb, ldmia, and how I can go about implementing this C++ code in arm assembly language?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM