G++ 编译多个源文件

g++ -c *.cpp

g++ graph.o maxflow.o test.o -o test  // 链接顺序必须写对

原文地址:https://www.cnblogs.com/TianyuSu/p/10873580.html