[llvm-dev] [Kaleidoscope] symbol(s) not found during compiling
Tim Northover via llvm-dev
llvm-dev at lists.llvm.org
Fri Jun 1 06:44:58 PDT 2018
On 1 June 2018 at 14:31, Xing GUO via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> $ g++ -I/usr/local/opt/llvm/include -L/usr/local/opt/llvm/lib -std=c++11
The -L option tells Clang where it should look for libraries, but
there's no corresponding option telling it which libraries to link
against. You need to link against specific LLVM libraries like
libLLVMCore.dylib.
You could do it manually ("-lLLVMCore" might work, depending on
exactly what you use), but using llvm-config as suggested on the
tutorial page is likely to be a lot simpler (and also get you any
other options that are necessary; I think LLVM expects some macros
that come out of "llvm-config --cxxflags" for example).
Cheers.
Tim.
More information about the llvm-dev
mailing list