【发布时间】:2016-09-30 10:14:15
【问题描述】:
我有两个名为 client.c 和 server.c 的 C 程序文件。这两个都包含主要功能。我在使用带有 makefile 的 g++ 编译它们时遇到了麻烦。
all:
g++ client.c server.c -o client server.c
【问题讨论】:
-
您需要为每个程序创建两个编译目标。您现在将尝试构建一个名为“client”的输出二进制文件,将两者合并。