Clang can't compile #include<new>

Dear all,

I have compiled several programs of SPEC2006 by clang, but I couldn’t compile program 444.namd, and I got the the following fatal error:

./ResizeArrayRaw.h:19:10: fatal error: ‘new’ file not found
#include
^

It seems that clang can’t find the c++ standard library. Does anyone know how I can solve this problem?

Any advise would be appreciated.

regards,

Danna

Could you please give us a bit more information:

  • What platform are you on?
  • What standard library are you using?
  • Where is you library located?
  • How are you invoking clang?

Nikola

Forwarding to mailing list as I don’t know much about these weird looking triples from another planet :slight_smile:

Have you tried providing the path to standard library using -I?
Do you have cross-compile version of libstdc++ installed?

Thank you Nokola, my problem solved. I just add the following path to standard library to the clang!
-I/usr/arm-linux-gnueabihf/include/c++/4.7.3/arm-linux-gnueabihf/ and -I/usr/arm-linux-gnueabihf/include/c++/4.7.3/

regards,

Danna