[LLVMdev] link problem with llvm-pass
Nico
listiges at arcor.de
Fri Jan 2 11:17:33 PST 2009
Hi,
I tried to implement an 'llc'-like tool in my project to manage
different passes and a target machine.
I use given llvm project structure to avoid problems but I have a link
problem and don't know how to solve it:
The target machine uses 'FindUsedTypes' pass and when I try to use my
target machine in the tool I got "Undefined symbols:
"llvm::FindUsedTypes ... ld: symbol(s) not found"
I tried following link options:
LLVMLIBS = LLVMAnalysis.a
LINK_COMPONENTS = analysis
LINK_COMPONENTS = all
But nothing solved my problem (in fact the last made some other
problems with code I never touched).
I would be very appreciated for any idea.
Thanks a lot
Nico
PS: output from "make VERBOSE=1"
llvm[2]: Linking Release executable llx (without symbols)
/Users/me/Work/code/llvm-2.4/mklib --tag=CXX --tag=disable-shared --
mode=link g++ -I/Users/me/Work/code/llvm-2.4/include -I/Users/me/Work/
code/synphony/llvmllila/build/include -I/Users/me/Work/code/synphony/
llvmllila/build/tools/llx -I/Users/me/Work/code/synphony/llvmllila/
include -I/Users/me/Work/code/synphony/llvmllila/tools/llx -D_DEBUG -
D_GNU_SOURCE -D__STDC_LIMIT_MACROS -O3 -fno-exceptions -Woverloaded-
virtual -pedantic -Wall -W -Wwrite-strings -Wno-long-long -Wunused -
Wno-unused-parameter -fstrict-aliasing -Wstrict-aliasing -O3 -rpath /
Users/me/Work/code/synphony/llvmllila/build/Release//bin -export-
dynamic -L/Users/me/Work/code/synphony/llvmllila/build/Release//lib -L/
Users/me/Work/code/llvm-2.4/Release//lib -o /Users/me/Work/code/
synphony/llvmllila/build/Release//bin/llx /Users/me/Work/code/
synphony/llvmllila/build/tools/llx/Release/main.o -lLMABE -lPartition -
lLLVMBitReader -lLLVMAnalysis -lLLVMTarget -lLLVMCore -lLLVMSupport -
lLLVMSystem \
-lpthread -lm
g++ -I/Users/me/Work/code/llvm-2.4/include -I/Users/me/Work/code/
synphony/llvmllila/build/include -I/Users/me/Work/code/synphony/
llvmllila/build/tools/llx -I/Users/me/Work/code/synphony/llvmllila/
include -I/Users/me/Work/code/synphony/llvmllila/tools/llx -D_DEBUG -
D_GNU_SOURCE -D__STDC_LIMIT_MACROS -O3 -fno-exceptions -Woverloaded-
virtual -pedantic -Wall -W -Wwrite-strings -Wno-long-long -Wunused -
Wno-unused-parameter -fstrict-aliasing -Wstrict-aliasing -O3 -o /Users/
me/Work/code/synphony/llvmllila/build/Release//bin/llx /Users/me/Work/
code/synphony/llvmllila/build/tools/llx/Release/main.o -L/Users/me/
Work/code/synphony/llvmllila/build/Release//lib -L/Users/me/Work/code/
llvm-2.4/Release//lib -lLMABE -lPartition -lLLVMBitReader -
lLLVMAnalysis -lLLVMTarget -lLLVMCore -lLLVMSupport -lLLVMSystem -
lpthread -lm
Undefined symbols:
"llvm::FindUsedTypes::ID", referenced from:
__ZN4llvm13FindUsedTypes2IDE$non_lazy_ptr in
libLMABE.a(LMAWriter.o)
"typeinfo for llvm::FindUsedTypes", referenced from:
__ZTIN4llvm13FindUsedTypesE$non_lazy_ptr in
libLMABE.a(LMAWriter.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[2]: *** [/Users/me/Work/code/synphony/llvmllila/build/Release//
bin/llx] Error 1
make[1]: *** [all] Error 1
make: *** [all] Error 1
More information about the llvm-dev
mailing list