[LLVMdev] undefined reference to extern variables

Haopeng Liu hyliuhp at gmail.com
Sat Jul 11 20:24:02 PDT 2015


Hi All,

I defined some variables in 
tools/clang/lib/Frontend/CompilerInstance.cpp. Then I tried to refer 
these variables in lib/Bitcode/Writer/BitCodeWriter.cpp with extern keyword.

'make' reports errors while linking opt. (error: undefined reference to 
"var_name"). I think I need modify some Makefiles to figure out that opt 
is depended on Frontend.

But I have no idea about how to modify. Any suggestion?

Thanks,
Haopeng







More information about the llvm-dev mailing list