c - `__heap_base` seems to be missing in clang 9.0.0, is there a replacement?
问题描述
I'm trying to compile a C library of mine for WebAssembly, using clang (no emscripten), and it compiles fine with clang
version 8.0.1
, but fails with clang
version 9.0.0
. The reported error is wasm-ld: error: ….o: undefined symbol: __heap_base
. Has __heap_base
been replaced with some other symbol?
The library is open source and compilation instructions can be found here
解决方案
实际上,我相信我找到了罪魁祸首:链接器9.0.0
似乎需要--export=__heap_base
( -Wl,--export=__heap_base
for the clang
)。这适用于我的项目。
推荐阅读
- python - 在同一类下使用更改 xpath 刮取元素
- java - HBase shell 崩溃并给出 CMSIncrementalMode 错误
- angular - 如何在 ng-bootstrap Carousel 中获取索引图像
- unity3d - 奇怪的 Instatiate 健康栏
- python - 如何格式化从多对多关系访问的元素?
- visual-studio-2017 - Azure DevOps 中已删除的项目以其 ID 保留在 Visual Studio 中
- linux - 从win10到linux的SSH连接脚本
- android - 使用 Android Studio 创建新的 Flutter 项目时出现问题
- macos - Visual Studio 社区冻结在 macOS 上创建新的 Xamarin 项目
- python - 带有应用程序调度的 CLI