【问题标题】:MinGW's ar.exe "could not create temporary file whilst writing archive: no more archived files" error upon building in CodeblocksMinGW 的 ar.exe “在写入存档时无法创建临时文件:没有更多存档文件”错误在代码块中构建时
【发布时间】:2019-01-13 19:33:23
【问题描述】:

所以我尝试在 Codeblocks 中构建 Odamex 并遇到了一个我没有找到任何解决方案的问题。我在第一个构建序列中出现了这个特定错误:

ar.exe: could not create temporary file whilst writing archive: no more archived files

完整读数:

cmd /c if exist ..\..\lib\libtextscreen.a del ..\..\lib\libtextscreen.a
ar.exe -r -s ..\..\lib\libtextscreen.a ..\..\obj\libtextscreen\gcc\release\txt_button.o ..\..\obj\libtextscreen\gcc\release\txt_checkbox.o ..\..\obj\libtextscreen\gcc\release\txt_desktop.o ..\..\obj\libtextscreen\gcc\release\txt_dropdown.o ..\..\obj\libtextscreen\gcc\release\txt_fileselect.o ..\..\obj\libtextscreen\gcc\release\txt_gui.o ..\..\obj\libtextscreen\gcc\release\txt_inputbox.o ..\..\obj\libtextscreen\gcc\release\txt_io.o ..\..\obj\libtextscreen\gcc\release\txt_label.o ..\..\obj\libtextscreen\gcc\release\txt_radiobutton.o ..\..\obj\libtextscreen\gcc\release\txt_scrollpane.o ..\..\obj\libtextscreen\gcc\release\txt_sdl.o ..\..\obj\libtextscreen\gcc\release\txt_separator.o ..\..\obj\libtextscreen\gcc\release\txt_spinctrl.o ..\..\obj\libtextscreen\gcc\release\txt_strut.o ..\..\obj\libtextscreen\gcc\release\txt_table.o ..\..\obj\libtextscreen\gcc\release\txt_utf8.o ..\..\obj\libtextscreen\gcc\release\txt_widget.o ..\..\obj\libtextscreen\gcc\release\txt_window.o ..\..\obj\libtextscreen\gcc\release\txt_window_action.o
ar.exe: creating ..\..\lib\libtextscreen.a
ar.exe: could not create temporary file whilst writing archive: no more archived files
Process terminated with status 1 (0 minute(s), 1 second(s))
0 error(s), 0 warning(s) (0 minute(s), 1 second(s))

从谷歌搜索看来,这可能与文件夹权限有关,但我对所有文件夹都拥有完全权限。

有没有其他人在 Codeblocks 上构建项目时遇到过这个错误?找不到任何其他线程。任何提示都会非常感谢您!

【问题讨论】:

    标签: c++ mingw codeblocks


    【解决方案1】:

    我在尝试通过 Eclipse 构建静态库时遇到了类似的问题,我也很困惑。

    将工具链“MinGW GCC”与 CDT 内部构建器一起使用:

    19:37:16 **** Rebuild of configuration Debug for project myLibS ****
    Info: Internal Builder is used for build
    gcc -O0 -g3 -Wall -c -fmessage-length=0 -o q1.o "..\\q1.c" 
    ar -r libmyLibS.a q1.o 
    ar: creating libmyLibS.a
    ar: could not create temporary file whilst writing archive: no more archived files
    
    19:37:17 Build Finished. 0 errors, 0 warnings. (took 906ms)
    

    到目前为止,我只找到了一个workaraoound 使用带有 CDT 内部构建器的工具链“cygwin GCC”:

    19:14:37 **** Rebuild of configuration Debug for project myLibS ****
    Info: Internal Builder is used for build
    gcc -O0 -g3 -Wall -c -fmessage-length=0 -o q1.o "..\\q1.c" 
    ar -r libmyLibS.a q1.o 
    /usr/bin/ar: creating libmyLibS.a
    
    19:14:37 Build Finished. 0 errors, 0 warnings. (took 937ms)
    

    我希望有人能解决这个 MinGW 问题。

    【讨论】:

      【解决方案2】:

      我遇到了同样的问题,但只有当我在 C/C++ Build 项目选项下添加或修改环境设置时。

      我发现,如果我选择(在环境变量下方)“将变量附加到本机环境”,错误就会消失。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2016-05-21
        • 1970-01-01
        • 2010-11-14
        • 1970-01-01
        • 1970-01-01
        • 2015-10-22
        相关资源
        最近更新 更多