Ali Sedaghat
2013-Jan-14 06:11 UTC
[LLVMdev] linking standard c++ functions @_Znam and @_Znwm
I'm new to c++ programming and currently working on an llvm front-end development project. When I link the object files created by llc, my linker cannot locate the following functions. I know that these are standard c++ library functions but g++ cannot locate them. Now my question is that where are these functions defined and how can I link them with my object files, and actually what do they do? declare noalias i8* @_Znam(i64) declare noalias i8* @_Znwm(i64) the emitted error messages are as follows: undefined reference to `operator new[](unsigned long)' undefined reference to `operator new(unsigned long)' We are reaching the deadline of the project but I haven't found any solution for this problem. So, please help me. Any help would be appreciated. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130114/ff8e78c0/attachment.html>
Duncan Sands
2013-Jan-14 08:49 UTC
[LLVMdev] linking standard c++ functions @_Znam and @_Znwm
Hi Ali, On 14/01/13 07:11, Ali Sedaghat wrote:> I'm new to c++ programming and currently working on an |llvm| front-end > development project. When I link the object files created by llc, my linker > cannot locate the following functions.what is the exact command you are using to link? Ciao, Duncan. I know that these are standard c++> library functions but g++ cannot locate them. Now my question is that where are > these functions defined and how can I link them with my object files, and > actually what do they do? > > |declare noalias i8* @_Znam(i64) > > declare noalias i8* @_Znwm(i64) > > the emitted error messages are as follows: > > undefined reference to `operator new[](unsigned long)' > > undefined reference to `operator new(unsigned long)' > > We are reaching the deadline of the project but I haven't found any solution for this problem. So, please help me. > > Any help would be appreciated. > | > > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >
ali_sedaghat
2013-Jan-14 18:50 UTC
[LLVMdev] linking standard c++ functions @_Znam and @_Znwm
I use the following command: g++ -o executable my-obj-files -L/usr/lib/i386-linux-gnu -- View this message in context: http://llvm.1065342.n5.nabble.com/linking-standard-c-functions-Znam-and-Znwm-tp53638p53668.html Sent from the LLVM - Dev mailing list archive at Nabble.com.