股票

Undefined symbols for architecture x86_64

今天又犯傻了!

编译C++++程序的时候跳出来这个错误:

Undefined symbols for architecture x86_64:
“Stack<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::isfull()”, referenced from:
_main in stacktem-1d9b17.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

最烦这种,没有任何提示,只是告诉你错了,前后各种查没有结果,然后注意到错误里面的提示 isfull() 函数有问题,再回头看声明文件和实现,isfull()这个函数竟然只声明没有定义!

悲哀,补上完事。

打赏
原文链接:,转发请注明来源!

发表评论