Yannis Mantzouratos
2009-Dec-29 19:31 UTC
[LLVMdev] Fwd: Linking fails when compiling files that use llvm routines
Hi, I 've built llvm 2.6 in linux, and then i installed it in the system by 'make install'. However, when i try to compile a file that uses llvm routines and libraries (by giving the command: "{compiler} `llvm-config --cxxflags --ldflags --libs all -o Test test.cpp" where i tried both llvm-g++ and g++ in the {compiler} field), the linking fails and an "undefined reference to llvm::some_llvm_routine()" error message is raised. The lib files are actually placed in the /usr/local/lib directory, but they seem as they do not exist or something? I would appreciate it very much if any help could be provided. Cheers, Yannis Mantzouratos.
Samuel Crow
2009-Dec-30 01:49 UTC
[LLVMdev] Fwd: Linking fails when compiling files that use llvm routines
Hi Yannis, It looks like you're missing a second back-quote before the -o. Is that exactly what you've been typing? Have you tried typing llvm-config by itself to see what is supposed to link in? --Sam ----- Original Message ----> From: Yannis Mantzouratos <giannismantz at gmail.com> > To: llvmdev at cs.uiuc.edu > Sent: Tue, December 29, 2009 1:31:59 PM > Subject: [LLVMdev] Fwd: Linking fails when compiling files that use llvm routines > > Hi, > > I 've built llvm 2.6 in linux, and then i installed it in the system > by 'make install'. However, when i try to compile a file that uses > llvm routines and libraries (by giving the command: "{compiler} > `llvm-config --cxxflags --ldflags --libs all -o Test test.cpp" where i > tried both llvm-g++ and g++ in the {compiler} field), the linking > fails and an "undefined reference to llvm::some_llvm_routine()" error > message is raised. The lib files are actually placed in the > /usr/local/lib directory, but they seem as they do not exist or > something? I would appreciate it very much if any help could be > provided. > > Cheers, > Yannis Mantzouratos. > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Yannis Mantzouratos
2009-Dec-30 02:41 UTC
[LLVMdev] Fwd: Linking fails when compiling files that use llvm routines
Hi Sam, That was a typo, i was actually typing "{compiler} `llvm-config --cxxflags --ldflags --libs all` -o Test test.cpp". I have already tried typing llvm-config by itself and everything seemed as expected, so i suppose that the problem isn't there. Thanks, Yannis PS: that "Fwd:" in the thread subject is also a nice example of typo :-) 2009/12/30 Samuel Crow <samuraileumas at yahoo.com>:> Hi Yannis, > > It looks like you're missing a second back-quote before the -o. Is that exactly what you've been typing? Have you tried typing llvm-config by itself to see what is supposed to link in? > > --Sam >
Seemingly Similar Threads
- [LLVMdev] Fwd: Linking fails when compiling files that use llvm routines
- [LLVMdev] Adding a new instruction?
- [LLVMdev] support for attach embedded metadata to function/argument/basicblock proposal
- smbclient sending no frames outside local VLAN
- How to DRY REST admin path in URLs?