问题描述: 在SDK中创建c++项目后,导入了一个lwip udp传输的程序,该程序使用c语言编写,编译过后出现如下警告: Description Resource Path Location Type ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings] main.cpp /ADC/src line 252 C/C++ Problem 如图所示: 问题解决: 之前是因为在函数 void print_ip()中定义了char* msg,改成char const *msg即可; 以上。