[cfe-dev] "::malloc not found"

Martin C. Martin martin at martincmartin.com
Fri May 11 10:12:06 PDT 2012


Hi,

I can compile libmemcached-1.0.5 just fine with gcc/g++ (on Ubuntu 
12.04).  But when I try with Clang 3.0 I get:

   CXX    libmemcached/csl/libmemcached_libmemcached_la-context.lo
In file included from libmemcached/csl/context.cc:38:
In file included from ./libmemcached/csl/common.h:40:
In file included from ./libmemcached/common.h:49:
/usr/include/c++/4.6/cstdlib:118:11: error: no member named 'malloc' in 
the global namespace
   using ::malloc;
         ~~^
/usr/include/c++/4.6/cstdlib:126:11: error: no member named 'realloc' in 
the global namespace
   using ::realloc;
         ~~^

Any pointers on whether this is a Clang or libmemcached problem?  It 
compiles just fine with gcc after all...

Best,
Martin




More information about the cfe-dev mailing list