我有一个默认的C/C++工具集(gcc 4.8),最近在自己的目录中构建并安装了5.2。我想使用makefile构建一些C++程序,它使用CC和CXX外植性来编译,但是使用隐式内建规则链接.o文件来构建可执行文件。在makefile上运行make时,我使用以下命令
make all CC=/usr/gcc-5.2.0/bin/gcc
我搞不懂为什么这不管用。g++不做任何事情/tmp/ccyg7NDd.o: In function `main':test.cc:(.text+0x19): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_trai