一种方法是在gcc编译时,将它禁掉。-Wno-write-strings
如:yangshifu@ubuntu:~/Documents/sipApp_tkj$ g++ *.cpp -shared -fpic -Wno-write-strings -o sip.so
一种方法是在C++源代码中将它禁掉,#pragma
GCC diagnostic ignored "-Wwrite-strings",只对某个文件生效
还有一种就是将const用const char*来保存就可以了
一种方法是在gcc编译时,将它禁掉。-Wno-write-strings
如:yangshifu@ubuntu:~/Documents/sipApp_tkj$ g++ *.cpp -shared -fpic -Wno-write-strings -o sip.so
一种方法是在C++源代码中将它禁掉,#pragma
GCC diagnostic ignored "-Wwrite-strings",只对某个文件生效
还有一种就是将const用const char*来保存就可以了
本文标题:如何去除gcc编译时出现的`deprecated convers
本文链接:https://www.haomeiwen.com/subject/tfqosxtx.html
网友评论