<div dir="ltr"><div><div><div><div><div><div><div><br></div>Hi,<br><br></div>I have a simple program example attached.<br></div>All it does is try to derive a class from llvm::MemoryObject.<br><br></div>Can anyone tell me why this fails to compile with this error message:<br>
clang -DHAVE_CONFIG_H -I. -I../src -I../include -I../test -I/usr/include/llvm-c-3.2 -I/usr/include/llvm-3.2 -O0 -g3 -Wall -O0 -Wall -g3 -MT mem.o -MD -MP -MF .deps/mem.Tpo -c -o mem.o mem.cpp<br>mv -f .deps/mem.Tpo .deps/mem.Po<br>
/bin/bash ../libtool --tag=CXX --mode=link clang -I../test -I/usr/include/llvm-c-3.2 -I/usr/include/llvm-3.2 -O0 -g3 -Wall -O0 -Wall -g3 -export-dynamic -module -avoid-version -O0 -Wall -o mem mem.o -L/usr/local/lib/beauty -lz -ldl -lLLVM-3.2 -L/usr/lib/llvm-3.2/lib -lstdc++ <br>
libtool: link: clang -I../test -I/usr/include/llvm-c-3.2 -I/usr/include/llvm-3.2 -O0 -g3 -Wall -O0 -Wall -g3 -O0 -Wall -o mem mem.o -Wl,--export-dynamic -L/usr/local/lib/beauty -lz -ldl -lLLVM-3.2 -L/usr/lib/llvm-3.2/lib -lstdc++<br>
mem.o:(.rodata+0x90): undefined reference to `typeinfo for llvm::MemoryObject'<br>clang: error: linker command failed with exit code 1 (use -v to see invocation)<br>make: *** [mem] Error 1<br><br><br></div>Will I have to rebuild llvm with rtti enabled, or is there some other fix I can do with standard llvm 3.2?<br>
</div><br></div>Kind Regards<br><br>James<br><br><div><div><div><div><div><br></div></div></div></div></div></div>