Trouble linking against LLVM with project including Flex and Bison

后端 未结 2 961
情深已故
情深已故 2021-01-13 08:55

I\'ve been working through a tutorial on writing compilers with Flex, Bison, and LLVM (http://gnuu.org/2009/09/18/writing-your-own-toy-compiler/), and attempting to compile

相关标签:
2条回答
  • 2021-01-13 09:22

    You may use:

    clang++ -g -O3 toy.cpp `llvm-config --cxxflags --ldflags --system-libs --libs core` -o toy
    

    Hope this helps.

    0 讨论(0)
  • 2021-01-13 09:30

    You need to put the libraries AFTER the source files on the command line

    0 讨论(0)
提交回复
热议问题