最近在用Eclipse写C++程序,今天把Eclipse设置上踩过的坑总结一下
1. program 'g++' not found in path
解决方法:Eclipse上打开Window -> Preferences -> Build -> Settings -> Discovery,找到其中的“CDT GCC Built-in Compiler Settings"项,把${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"改为/usr/bin/${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"
改完成功解决问题
2. Symbol 'std' could not be resolved
解决方法:在Project上右键选择Properties,选择C/C++ General -> Path and Symbols -> Languages: GNU C++
Apply后问题解决
网友评论