当前位置:网站首页>makefile出问题:无法检测文件的更新
makefile出问题:无法检测文件的更新
2022-06-10 17:40:00 【[email protected]】
makefile出问题:无法检测文件的更新
all:message ClientMessage
message:messageDeal.o
gcc messageDeal.o -o message -lpthreadlWs2_32
ClientMessage:ClientMessage.o
gcc $< -o [email protected]
%.o:%.c
gcc -c $< -o [email protected]
clean:
-rm *.o message.exe ClientMessage.exe.PHONY:clean
这样写在linux下,all的目标文件默认为可执行文件可以检查文件依赖的更新,但不知为什么Windows下不可以,要这样写
all:message.exe ClientMessage.exe
message.exe:messageDeal.o
gcc messageDeal.o -o message -lpthreadlWs2_32
ClientMessage.exe:ClientMessage.o
gcc $< -o [email protected]
%.o:%.c
gcc -c $< -o [email protected]
clean:
-rm *.o message.exe ClientMessage.exe.PHONY:clean
必须把可执行文件的后缀写成.exe
版权声明
本文为[[email protected]]所创,转载请带上原文链接,感谢
https://blog.csdn.net/weixin_44333998/article/details/109060225
边栏推荐
- Solve the problem that vs2022 slowly loads a pile of symbols when debugging the program
- ZigBee模块无线传输星形拓扑组网结构简介
- IP summary (tcp/ip volumes 1 and 2)
- 【数据库】结构化数据、非结构化数据、半结构化数据的区别
- 如何定位游戏发热问题
- Abbexa 8-OHdG CLIA 试剂盒解决方案
- Summary of vim common commands
- The short ticket hypothesis: finding sparse, trainable neural networks
- c语言---10 初识结构体
- AOE network critical path
猜你喜欢
随机推荐
微信小程序仿陶票票课程设计
Leetcode 875. Coco, who likes bananas
Record of cmake and GCC installation
mmdetection之dataset类解读
pwnable start
True thesis of information system project manager in the first half of 2022
CodeCraft-22 and Codeforces Round #795 (Div. 2)
XML&Xpath解析
(CVPR 2020) RandLA-Net: Efficient Semantic Segmentation of Large-Scale Point Clouds
Abbexa CDAN1 siRNA使用说明书
安装Linux系统的MySQL,在xshell中遇见的问题
C language -- 12 branch statement switch
Jouer avec la classe de fonctions de pytorch
c语言---8 初识常见关键字
One of the Taobao short video pit avoidance Guide Series -- thoroughly understand Taobao short video
What is image search
c语言---2 初识数据类型
线性移动棋
【FAQ】运动健康服务REST API接口使用过程中常见问题和解决方法总结
分享这位大神的WPF界面设计系列视频









