>  Q&A  >  본문

C++程序编译出现这种问题是怎么回事?

wangxiaoxiaodeMacBook-Air:TextQuery wangxiaoxiao$ g++ -std=c++11  main.cpp  TextQuery.cpp QueryResult.cpp Query.cpp Query_base.cpp WordQuery.cpp AndQuery.cpp OrQuery.cpp  -o TextQuery
Undefined symbols for architecture x86_64:
  "operator&(Query const&, Query const&)", referenced from:
      RunQueries(std::basic_ifstream<char, std::char_traits<char> >&) in ccXxFDh5.o
  "operator|(Query const&, Query const&)", referenced from:
      RunQueries(std::basic_ifstream<char, std::char_traits<char> >&) in ccXxFDh5.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
高洛峰高洛峰2764일 전533

모든 응답(1)나는 대답할 것이다

  • 迷茫

    迷茫2017-04-17 13:59:54

    操作符未重载

    회신하다
    0
  • 취소회신하다