C++编译之提示ld: can‘t open output file for writing: test1, errno=21 for architecture x86_64
发布日期:2021-06-29 14:13:05 浏览次数:2 分类:技术文章

本文共 323 字,大约阅读时间需要 1 分钟。

1 问题

在mac 终端写了一个cpp文件,然后用命令编译运行提示错误如下

1111deMBP:code a1111$ g++ -std=c++11 test1.cpp -o test1ld: can't open output file for writing: test1, errno=21 for architecture x86_64clang: error: linker command failed with exit code 1 (use -v to see invocation)

 

 

 

2 解决办法

应该是这个目录上有2个 test1.cp文件存在,只要修改这个文件名字编译就行

mv test1.cpp test123.cpp

 

转载地址:https://chenyu.blog.csdn.net/article/details/83834496 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:C++之智能指针和普通指针单例模式两种实现
下一篇:Android之build.gradle配置签名

发表评论

最新留言

路过按个爪印,很不错,赞一个!
[***.219.124.196]2024年04月17日 00时01分01秒