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条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
    • ¥50 有数据,怎么用matlab求全要素生产率
    • ¥15 TI的insta-spin例程
    • ¥15 完成下列问题完成下列问题
    • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
    • ¥15 YoloV5 第三方库的版本对照问题
    • ¥15 请完成下列相关问题!
    • ¥15 drone 推送镜像时候 purge: true 推送完毕后没有删除对应的镜像,手动拷贝到服务器执行结果正确在样才能让指令自动执行成功删除对应镜像,如何解决?
    • ¥15 求daily translation(DT)偏差订正方法的代码
    • ¥15 js调用html页面需要隐藏某个按钮