lundi 7 décembre 2015

Cloud9 C++11 support?

Im actively using Cloud9 with my students when i teach C++ basics. I know it is not the best environment since it uses an old compiler but its a very good online editor with its own repository (id use github but it has no editor and cloud9 is usable on smart phones and tablets to later read code on the move)

The big question is that im unable to turn on C++11 support althou the g++ v4.8.2 compiler should have full support for c++11 and c++0x. The condundrum however is that even if i add std==c++11 or std=c++0x(even tried gnu++11 and gnu++0x) to the compiler options, the compiler still returns with "range based for loops are not allowed in C++98 mode) Is it possible to enable it in any way?

heres the runner configuration (i even tried it by using gcc instead of g++ to no avail)

// Create a custom Cloud9 runner - similar to the Sublime build system
// For more information see http://ift.tt/XZZPrD
{
  "cmd": [
    "sh",
    "-c",
    "/usr/bin/g++ -std=c++11 $file -o runme; chmod 755 $file_path/runme; $file_path/runme"
  ],
  "info": "Running $file_path/$file_name",
  "env": {},
  "selector": "^.*\\.(cpp|cc)$"

Aucun commentaire:

Enregistrer un commentaire