g++ --version
on my home machine reads 7.4.0
, but a server I frequently do work on shows 4.8.5
. Their servers don't support -std=c++11
compiler flags yet my home machine does. The most recent flag it does support is -std=c++0x
.
However, sometimes when I write code on my home machine, compile with -std=c++0x
flag without error, I will get errors if I brought it over to the server's local computers. Interestingly, SSHing to their servers does not show issues.
I'm not entirely sure what to make of this, I'm thinking my local machine may be ignoring the -std=c++0x
flag because I have a newer version. Is there a way to force a specific version?
If it makes any difference, I am using Windows 10 with LXSS (Ubuntu) and the server I am connecting to is using Redhat.
-std=c++11
option. – Alvin Liang Nov 13 '19 at 03:51g++ --version
is specific to SSHing into the servers.-std=c++11
works through SSH and on my local machine, but does not compile when using their local machines. I'll have to verify whichg++ --version
it is when on their local machines. – gator Nov 13 '19 at 04:03