[英]Build of opencv4 for c++ using cmake failing after upgrading to macOS Catalina
[英]C++ build failing on MacOS
我試圖在我的 Macbook 上運行我的 C++ 程序,我試圖通過運行構建任務C/C++:clang++ build active file
在 VSCode 中運行我的程序。 However, every time I do this I get this error ld: can't open output file for writing: /Users/admin/first/first, errno=21 for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) The terminal process terminated with exit code: 1
這似乎是一個簡單的權限問題:
ld: 無法打開 output 文件進行寫入
linker 無法寫入指定的文件。
編輯:正如 molbdnilo 正確指出的那樣, error 21
是EISDIR
,這意味着您嘗試寫入的文件已經作為目錄存在。 所以...只是這個文件夾? :)
您是否安裝了任何 c++ 工具? 有時這就是這些問題的根源。 該程序在應該使用 Homebrew 時嘗試使用本機操作系統版本,反之亦然。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.