错误:导出序号太大:104116

use*_*130 6 c++ mingw cmake inkscape ninja

我从源代码构建 Inkscape:

$ cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug ..
$ ninja install
Run Code Online (Sandbox Code Playgroud)

它返回错误如下。

[1002/1006] Building CXX object src/CMakeFiles/inkscape_base.dir/verbs.cpp.obj
[1003/1006] Linking CXX shared library bin\libinkscape_base.dll
FAILED: bin/libinkscape_base.dll src/libinkscape_base.dll.a
cmd.exe /C "cd . && C:\msys64\mingw64\bin\g++.exe  -fopenmp -m64 -mms-bitfields -mthreads -mwindows -pthread -std=c++11 -g   -shared -o bin\libinkscape_base.dll -Wl,--out-implib,src\libinkscape_base.dll.a -Wl,--major-image-version,0,--minor-image-version,0 @CMakeFiles/inkscape_base.rsp  && cd ."
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: Error: export ordinal too large: 104116
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
Run Code Online (Sandbox Code Playgroud)

什么会导致此错误以及如何解决?

注意:我可以成功构建 Inkscape,无需-DCMAKE_BUILD_TYPE=Debug.

小智 3

用于编译 DLL 的符号太多,但我已成功使用以下命令以构建样式“调试”和静态链接来编译 Inkscape:

cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=OFF -G Ninja ..
ninja install
Run Code Online (Sandbox Code Playgroud)