C++ 2011 standard (C++11) support

software development


I was trying to develop an application using C++11 standard, but compilers don’t seem to accept the standard option.

I have tried

cc -o output input.cc -x c++ -std=c++11


g++ -o output input.cc -std=gnu++11

and combinations.

Is there support for the C++11 standard in DreamHost shared servers?


As far as I can tell, the version of GCC installed on one of the shared machines doesn’t support C++11.

[dwalin]$ g++ --version
g++ (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3

Check this table to see what C/C++ versions are supported by which version of GCC: https://gcc.gnu.org/projects/cxx-status.html#cxx11

In any case, I would suggest you to compile on your own machines and not on a shared server.


I can compile in a 64-bit PC with Ubuntu 16.04 LTS. How likely are that my compiled binaries would work in DreamHost shared servers?


I’m not a C developer so I can’t give you a precise answer… but with the little I know, I would say that it depends on how you write and build your code… I’m quite sure that C libs versions vary a lot between 16.04 and whatever runs on DreamHost shared servers, so you should write and build your code to take into account older capabilities…

Now I’m curious though: what is this software doing?