mkoctfile std=c++11 default?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

mkoctfile std=c++11 default?

JuanPi
Hi,

Last week I gave an Octave course[1] and  had some troubles when
trying to compile simple .oct files. The issue was due to the
institution running with an old gcc, to which std=c++11 needed to be
passed.

Shouldn't mkoctfile set the std=c++11 option by default? If there is a
reason why not to do this, could you enlighten me?

Thanks!

[1] https://gitlab.com/kakila/octave-teaching

--
JuanPi Carbajal
https://goo.gl/ayiJzi
Public GnuPG key: 9C5B72BF
-----
"Why is thought, being a secretion of the brain, more wonderful than
gravity, a property of matter?"
- C. Darwin

Reply | Threaded
Open this post in threaded view
|

Re: mkoctfile std=c++11 default?

Mike Miller-4
On Sun, Dec 10, 2017 at 02:04:47 +0100, JuanPi wrote:
> Hi,
>
> Last week I gave an Octave course[1] and  had some troubles when
> trying to compile simple .oct files. The issue was due to the
> institution running with an old gcc, to which std=c++11 needed to be
> passed.
>
> Shouldn't mkoctfile set the std=c++11 option by default? If there is a
> reason why not to do this, could you enlighten me?

It does do so.

If I build Octave on Debian unstable with GCC 7, the default is already
-std=gnu++14, so no options are needed.

If I build Octave on Ubuntu 14.04 with GCC 4.8, the option -std=gnu++11
is added to the build options and is also included in mkoctfile by
default.

It's possible that this particular copy of Octave was built with GCC 6
or 7, but is now running on a system that has GCC 4 by default. That
would be a problem.

--
mike

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: mkoctfile std=c++11 default?

Juan Pablo Carbajal-2
Thanks Mike,

Ok, then I am happy! :D
I guess I will never know what was he actual root of the problem...
but who cares.