C++编译之提示ld: can‘t open output file for writing: test1, errno=21 for architecture x86_64
生活随笔
收集整理的這篇文章主要介紹了
C++编译之提示ld: can‘t open output file for writing: test1, errno=21 for architecture x86_64
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
1 問題
在mac 終端寫了一個cpp文件,然后用命令編譯運行提示錯誤如下
1111deMBP:code a1111$ g++ -std=c++11 test1.cpp -o test1 ld: can't open output file for writing: test1, errno=21 for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)?
?
?
2 解決辦法
應該是這個目錄上有2個 test1.cp文件存在,只要修改這個文件名字編譯就行
mv test1.cpp test123.cpp?
總結
以上是生活随笔為你收集整理的C++编译之提示ld: can‘t open output file for writing: test1, errno=21 for architecture x86_64的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Android之build.gradle
- 下一篇: C++之智能指针和普通指针单例模式两种实