c++ - 错误 : export ordinal too large: 104116

标签 c++ cmake mingw inkscape ninja

我使用源代码构建 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/

相关文章:

c++ - Linux 上 Windows 的交叉编译提升

c++ - 在非静态成员函数上使用 C++ 11 多线程

c++ - 在 C++ 程序中找不到环境变量 UID

c++ - FreeBSD 上的 CMake 在/usr/local/include 中看不到 GL/gl.h

c++ - fno-exceptions 和 POSITION INDEPENDENT CODE 的交互

c++ - 如何在 Windows 上运行 makefile?

c++ - 为什么我可以将 Int 分配给 String 而不会出现编译器错误?

c++ - ATL/WTL 是否仍然需要使用全局 _Module 变量?

c++ - 有条件的 CMAKE 链接到 rt-library

c++ - gtest 和 MinGW 联动