【发布时间】:2020-01-01 23:17:48
【问题描述】:
我正在 Windows 10 上使用 cmake 和 mingw-w64 构建 ASSIMP,它在创建目标代码时给我“文件太大”错误。我尝试使用 MinGW 和 MinGW-w64 并且都给了我同样的错误。我使用默认设置,我用cmake配置项目,生成makefile然后运行mingw32-make。我可以设置某种标志来解决这个问题吗?
编译器:
g++ (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 8.1.0
这是输出:
[ 59%] Building CXX object code/CMakeFiles/assimp.dir/Importer/StepFile/StepFileImporter.cpp.obj
[ 60%] Building CXX object code/CMakeFiles/assimp.dir/Importer/StepFile/StepFileGen1.cpp.obj
C:/mingw-w64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/as.exe:
CMakeFiles\assimp.dir\Importer\StepFile\StepFileGen1.cpp.obj: section .xdata$_ZNSt10_Head_baseILy0EPN6Assimp8StepFile29directed_dimensional_locationELb0EE7_M_headERKS4_:
string table overflow at offset 10000029
C:\Users\ANDREW~1.NOT\AppData\Local\Temp\ccwwseVM.s: Assembler messages:
C:\Users\ANDREW~1.NOT\AppData\Local\Temp\ccwwseVM.s: Fatal error: can't close CMakeFiles\assimp.dir\Importer\StepFile\StepFileGen1.cpp.obj: File too big
mingw32-make[2]: *** [code\CMakeFiles\assimp.dir\build.make:2485: code/CMakeFiles/assimp.dir/Importer/StepFile/StepFileGen1.cpp.obj] Error 1
mingw32-make[1]: *** [CMakeFiles\Makefile2:274: code/CMakeFiles/assimp.dir/all] Error 2
mingw32-make: *** [Makefile:129: all] Error 2
编辑:我使用的是来自 github 的 Assimp 主分支,它具有更新的实验功能。我下载了旧版本,但没有遇到同样的错误。
【问题讨论】:
-
猜测:您是否尝试使用 32 位编译器而不是 64 位编译器构建并且文件大于 2(或 3.5)GB?
标签: c++ cmake mingw-w64 assimp