[cfe-dev] undefined reference to `operator new(unsigned int)'

Klaus T. nightos at gmail.com
Fri Apr 8 14:33:23 PDT 2011


Hi,

Recently I started moving from GCC to Clang to compile my own OS. I am using
Windows and to compile my source files I use "clang++ -ccc-host-triple
i686-pc-linux" and  link them with i686-elf-ld. However, when I use the "new
operator" (like int*p = new int; ...) I get "undefined reference to
`operator new(unsigned int)'" while linking and yes, I use -lstdc++. When I
compile my source files with GCC I don't have this problem. Any ideas?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110408/f3f41956/attachment.html>


More information about the cfe-dev mailing list