我使用源代码构建 Inkscape:
$ cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug ..
$ ninja install
它返回如下错误。
[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.
什么会导致这个错误,如何解决?
注意:我可以在没有 -DCMAKE_BUILD_TYPE=Debug
的情况下成功构建 Inkscape。
最佳答案
编译 DLL 的符号太多,但我使用以下命令成功地编译了构建样式为“Debug”和静态链接的 Inkscape:
cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=OFF -G Ninja ..
ninja install
关于c++ - 错误 : export ordinal too large: 104116,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47135973/