Octave for Microsoft Windows: Difference between revisions

Jump to navigation Jump to search
→‎Octave with Visual Studio: include details for installing ghostscript to allow for print() functionality
(→‎Octave with Visual Studio: include details for installing ghostscript to allow for print() functionality)
Line 549: Line 549:


The pre-compiled versions for Visual Studio come in the form of a self-installing executable. Simply download the executable, run it and follow the installer instructions. To avoid possible problems with white spaces in the octave paths, it is '''strongly recommended''' to install octave in a directory that do not contain any white spaces.
The pre-compiled versions for Visual Studio come in the form of a self-installing executable. Simply download the executable, run it and follow the installer instructions. To avoid possible problems with white spaces in the octave paths, it is '''strongly recommended''' to install octave in a directory that do not contain any white spaces.
==Printing (installing Ghostscript)==
In order to use the {{Codeline|print}} command ghostscript must be installed.
The installer may be obtained at
[http://sourceforge.net/projects/ghostscript/ sourceforge].
The instructions below assume the GLP version of Ghostscript is installed in
the directory {{Codeline|<nowiki>C:\Program Files (x86)\GPLGS\</nowiki>}}.
In order for Octave to find Ghostscript, its executable must be in the command
shell's path.  This may be done by modifying the path variable via the Control
Panel, or by having Octave modify the path variable.
For the latter, to followiing lines may be placed in the {{Codeline|<nowiki>~/.octaverc</nowiki>}} file.
  cmd_path = getenv ("path");
  gs_path = 'C:\Program Files (x86)\GPLGS\';
  if (isempty (strfind (cmd_path, gs_path)))
    setenv ('path', strcat (cmd_path, pathsep (), gs_path));
  endif
To set the path via the Control Panel,
* Go to '''Control Panel''' --> '''System and Security''' --> '''System'''
* Click '''Advanced System Settings'''
* Click '''Environment Variables'''
* In the '''System Variables''' area, locate the Path variable, highlight it and click '''Edit'''.
* Make the required changes and confirm the change by clickiing '''OK''', '''OK''', '''OK'''.
At this point most of Octave's printing functionality will work.  When output is
produced usign teh print command the warnings below will be given.
  warning: print.m: epstool binary is not available.
  Some output formats are not available.
  warning: print.m: fig2dev binary is not available.
  Some output formats are not available.
  warning: print.m: pstoedit binary is not available.
  Some output formats are not available.
For the {{Codeline|print}} command to be fully functional, each of these utilities will also need to be installed,
and their locations added to the Path variable via either the Control Panel
or Octave's {{Codeline|<nowiki>~/.octaverc</nowiki>}} file.


==Using the Visual C++ compiler with Octave==
==Using the Visual C++ compiler with Octave==
364

edits

Navigation menu