pi@raspberrypi:~/raspitest $ g++ test.cpp -o test
In file included from /usr/include/c++/8/ext/string_conversions.h:41,
from /usr/include/c++/8/bits/basic_string.h:6400,
from /usr/include/c++/8/string:52,
from /usr/include/c++/8/bits/locale_classes.h:40,
from /usr/include/c++/8/bits/ios_base.h:41,
from /usr/include/c++/8/ios:42,
from /usr/include/c++/8/ostream:38,
from /usr/include/c++/8/iostream:39,
from test.cpp:1:
/usr/include/c++/8/cstdlib:75:15: fatal error: stdlib.h: No No such file or directory
#include_next <stdlib.h>
^~~~~~~~~~
compilation terminated.
我没有使用任何make工具,只是通过vim编写代码并运行以下命令:
pi@raspberrypi:~/raspitest $ g++ test.cpp -o test