Undefined reference to 'operator delete(void*)'

前端 未结 4 2113
长发绾君心
长发绾君心 2021-02-12 22:09

I\'m new to C++ programming, but have been working in C and Java for a long time. I\'m trying to do an interface-like hierarchy in some serial protocol I\'m working on, and kee

4条回答
  •  野性不改
    2021-02-12 22:37

    Sorry for posting in an old thread, but it's still pretty high in Google's search results and if you have this problem, you really should check out this link, because there it says that you simply need to link -lstdc++ and this is what solved the problem for me.

    The following line was added by the Community without highlighting it as such and instead of just adding a comment to my answer for reasons that elude me: "Or use a C++ compiler that will implicitly add the -lstdc++ option, e.g. g++."

提交回复
热议问题