0

我正在尝试从 LLVM 示例构建 ModuleMaker。

当我调用时:

clang++ -g ModuleMaker.cpp `llvm-config --cppflags --ldflags --libs core jit native` -o ModuleMaker

我收到错误消息:

/home/huangered/Desktop/ModuleMaker/main.cpp:59: undefined reference to `llvm::WriteBitcodeToFile(llvm::Module const*, llvm::raw_ostream&)'
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我怎样才能解决这个问题?

4

1 回答 1

0
clang++ main.cpp `llvm-config --cppflags --ldflags --libs core jit native bitwriter` -o main

o.i get it. i should add a bitwriter component into the llvm-config.

于 2013-08-20T01:10:35.040 回答