当前位置:网站首页>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
边栏推荐
猜你喜欢

Adding rendererdata of URP with script

JS special effect of canvas divergent particle H5 animation

Abbexa 细菌基因组 DNA 试剂盒介绍

Cdga| six key points of data governance for industrial enterprises

Container containing the most water

Linear mobile chess

High number_ Chapter 6 infinite series__ Properties of positive series

最新好文 | 基于因果推断的可解释对抗防御

Library for adding progress bar during training --tqdm

AOV网拓扑排序
随机推荐
Abbexa丙烯酰胺-PEG-NHS说明书
搭建在线帮助中心,轻松帮助客户解决问题
关于cmake和gcc的安装的记录
Abbexa 细菌基因组 DNA 试剂盒介绍
JS blur shadow follow animation JS special effect plug-in
CDGA|工业企业进行数据治理的六个关键点
How to locate the hot problem of the game
Linear mobile chess
【ceph】ceph配置源码分析|common/config.*
One of the Taobao short video pit avoidance Guide Series -- thoroughly understand Taobao short video
Domestic cosmetics, lost 618
QtMqtt 源码编译设置KeepAlive后ping包超时错误不返回问题修复(QMQTT::MqttNoPingResponse,QMQTT::ClientPrivate::onPingTimeo)
C language -- 14 loop statement for
Unity踩坑记录:如果继承MonoBehaviour,类的构造函数可能会被Unity调用多次,不要在构造函数做初始化工作
PCA principal component analysis tutorial (origin analysis & drawing, without R language)
js模糊阴影跟随动画js特效插件
C语言---1 C语言认知
Leetcode 321. Nombre maximum de raccords
Postman-接口测试工具
afl-fuzz多线程