Hello I'm trying to link my project with llvm 3.2 libraries. I haven't touched the project for some months. Previously I used to link to an svn build of llvm 3.1 and everything worked fine. I've compiled llvm with ./configure --enable-libcpp --enable-cxx11 Currently I'm only using StringRef, SmallVector and FoldingSet, so I only link libLLVMSupport and libLLVMCore. Are they enough or do I need to link something else? The error I get is the following: Undefined symbols for architecture x86_64: "typeinfo for llvm::FoldingSetImpl", referenced from: typeinfo for llvm::FoldingSet<Type> in Program.o ld: symbol(s) not found for architecture x86_64 Looking at the error the question is: is llvm built with RTTI support by default? If not, how do I enable it? i don't find an option in configure --help. If RTTI support is not the issue, which can be the cause of the error? Thank you, Nicola P.S: I'm sorry in case the list gets two copies of this message, I've had connection troubles
Nicola Gigante <nicola.gigante at gmail.com> writes:> The error I get is the following: > Undefined symbols for architecture x86_64: > "typeinfo for llvm::FoldingSetImpl", referenced from: > typeinfo for llvm::FoldingSet<Type> in Program.o > ld: symbol(s) not found for architecture x86_64 > > Looking at the error the question is: is llvm built with RTTI support > by default?No.> If not, how do I enable it?AFAIK, there is no method for enabling RTTI (other than modifying the makefiles).
Il giorno 18/mar/2013, alle ore 15:14, Óscar Fuentes <ofv at wanadoo.es> ha scritto:> Nicola Gigante <nicola.gigante at gmail.com> writes: > >> The error I get is the following: >> Undefined symbols for architecture x86_64: >> "typeinfo for llvm::FoldingSetImpl", referenced from: >> typeinfo for llvm::FoldingSet<Type> in Program.o >> ld: symbol(s) not found for architecture x86_64 >> >> Looking at the error the question is: is llvm built with RTTI support >> by default? > > No. > >> If not, how do I enable it? > > AFAIK, there is no method for enabling RTTI (other than modifying the > makefiles).Ok, but is it the source of the error? does it comes from the fact that I'm linking llvm libraries without rtti with my code that is compiled _with_ rtti? I cannot disable rtti in my code so it's a problem (at least I think so. I use dynamic_casts, is -fno-rtti only for typeinfo?) It sounds strange to me, the same used to apply before, but I didn't get this error last month with the old setup… Any hint? Thank you, Nicola