Paul Bpoint
Paul Bpoint

Reputation: 11

Program Octave in Xcode

Community, probably my question seems really stupid, but maybe someone can guide me out of it. I installed everything as described here: https://adampash.com/how-to-install-octave/ and I can use Octave now in my terminal.

Is it possible to program Octave in the Xcode window to use the debugging options or something similar? Or is it just possible within the terminal?

I have used Google to find a solution. Unfortunately, I haven't found any that described my question.

Thank you
Paul

Upvotes: 1

Views: 975

Answers (1)

Andrew Janke
Andrew Janke

Reputation: 23848

No, you can't use Xcode. Xcode is for C, C++, Objective C, Swift, and other languages, but not Octave/Matlab. There's a reason for this: Xcode mostly supports compiled languages. Octave is an interpreted language with a heavy emphasis on interactive use. So a different sort of IDE is appropriate for it.

Octave has its own built-in GUI that is a sort of IDE. Use that instead of Xcode.

If you have Octave built with Qt support (which is the default for Homebrew and Octave.app installs on Mac), you can run it with octave --gui from the command line, or by double-clicking the Octave.app icon in /Applications.

The installation instructions in that link are out of date. There is no longer a --with-x11 option for brew install octave, you no longer need X11 or XQuartz, and it's no longer in homebrew/science. Just run:

brew install octave

NOTE as of April 2019: The current Homebrew Octave is Octave 5.1.0, which has significant stability problems with its GUI. Instead, you probably want to use Octave 4.4.1 for now. To do that, download Octave.app 4.4.1.

Upvotes: 1

Related Questions