打空间管理SDK时报错:"Undefined reference to '__cxa_guard_acquire'" error message

来源:互联网 发布:如何提高淘宝店铺排名 编辑:程序博客网 时间:2024/05/27 02:33

转载自:http://blog.sina.com.cn/s/blog_607233f50100xlml.html


用gcc编译 c++ 程序时,出现错误 undefined reference to __cxa_guard_acquire linker error, 但是用icc可以正常编译, 问题出在static 上。从网上搜到的解决办法是加库的链接:

To resolve this undefined references (__cxa_guard_acquire ) , add a library flag "-lstdc++" in your Makefile. It should work. It worked for me.

(http://rowley.zendesk.com/entries/46190-undefined-reference-to-cxa-guard-acquire-error-message)

加上后工作正常。


//

今天是博士报道的第一天,终于熬成了博士,才突然感到自己付出了太多。加油吧!为自己喝彩!


原来是少了 libstdc++.dylib  这个库文件 ,加上即可!!!



0 0
原创粉丝点击