2013年8月24日星期六

gcc for c++ program

gcc  -g testcpp.cpp -o testcpp

many link error occurs, the reason is that gcc would not automatically link the library for c++, we have to do it manually...

gcc -l stdc++ -g testcpp.cpp -o testcpp

here we go