dongxia2068 2019-01-19 23:30
浏览 62

如何在Windows 10上修复Go的LLVM绑定?

I am trying to get the LLVM package - documented here - which provides bindings for Go to run properly.

The package is importing but a file called analysis.go is complaining:

[go] fatal error: llvm-c/Analysis.h: No such file or directory

This links to line 16 in analysis.go:

#include "llvm-c/Analysis.h" // If you are getting an error here read bindings/go/README.txt

This line is inside of a comment block. I have already read the readme which instructs me to run a shell script called build.sh with a list of flags:

build.sh -DCMAKE_BUILD_TYPE=Debug -DLLVM_TARGETS_TO_BUILD=host -DBUILD_SHARED_LIBS=ON

I have done this multiple times. When I first tried to solve this problem, there was another related problem which was that llvm_config.go was empty (there was no code) and so golang was complaining that:

llvm_config.go:1:1: expected 'package', found 'EOF'

Golang isn't throwing an error anymore for this although the file is still empty - the error might have gone away after I ran the shell script with flags but I can't be sure.

Can anyone suggest what I could do to solve these problems? If you need more details I will happily oblige. I am a self taught hobbyist so apologies if this is a stupid question.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
    • ¥15 Vue3地图和异步函数使用
    • ¥15 C++ yoloV5改写遇到的问题
    • ¥20 win11修改中文用户名路径
    • ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入
    • ¥15 用土力学知识进行土坡稳定性分析与挡土墙设计
    • ¥70 PlayWright在Java上连接CDP关联本地Chrome启动失败,貌似是Windows端口转发问题
    • ¥15 帮我写一个c++工程
    • ¥30 Eclipse官网打不开,官网首页进不去,显示无法访问此页面,求解决方法
    • ¥15 关于smbclient 库的使用