Question

I have a default compiler on MacOS set to clang. When installing packages for octave (using pkg install from the octave prompt), I would like mkoctfile to use the macports gcc48. (In fact, octave itself was built using gcc48).

In other words:

mkoctfile -p CC

gives me the path to the default clang, and I would like it to point to gcc48. Is there a configuration file for mkoctfile which would allow such a thing?

Was it helpful?

Solution

You must set the environment variable CXX. You can do this by, running setenv ("CXX", "your favourite compiler") before pkg install (leave it in your octave.rc so it's ran every time), or by running export CXX=your_favourite_compiler before starting octave.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top