http://wiki.octave.org/Octave_for_Microsoft_Windows
Octave with Visual Studio
Octave binaries compiled with Microsoft Visual Studio are available for download from Octave-Forge site. These binaries come in the form of an easy-to-use installer (created with NSIS) and are provided in 2 flavors: pre-compiled version for Visual Studio 2008 and for Visual Studio 2010.
These binaries do not include the Microsoft Visual C++ compiler. This must be installed separately, but is only required if you plan to compile and link source code against the pre-compiled octave release. If the Visual C++ compiler is not present on the target system, then the Visual C++ runtime libraries must be installed prior the installation of these binaries. These runtime libraries are support libraries that are required by any code compiled with the Visual C++ compiler. They can be downloaded for free from the Microsoft download site:
Note that if you already installed other software on your system, there is a possibility that these runtime libraries are already present. Search for a files named msvcr90.dll (Visual Studio 2008) or msvcr100.dll (Visual Studio 2010) in the %WINDIR% directory (usually C:\WINDOWS).
[edit]Installation
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.
Octave-Forge packages are not installed by default. To install packages, expand the section "Octave Forge" in the component selection page of the installer and select the packages you wish to install. Note that installed packages are not loaded by default. To use the packages, you still need to load them into octave.
[edit]Printing (installing Ghostscript)
In order to use the print command ghostscript must be installed. The installer may be obtained at sourceforge.
The instructions below assume the GLP version of Ghostscript is installed with the Destination directory C:\Program Files (x86)\GPLGS\. The Destination directory may be different for 32 bit and 64 bit windows and can also change for different versions of Ghostscript. Therefore, it is important that the user make note of the Destination directory used to install Ghostscript and use it in place of the Destination directory used in these instructions.
In order for Octave to find Ghostscript, the directory containing Ghostscript's command line program must be in the command shell's path. The name of Ghostscript's command line program may vary. Some examples are gswin32c.exe, gswin64c.exe, gs.exe, and mgs.exe. To directory containing Ghostscript's command line program may either be added to the command shell's using Windows Control Panel, or by having Octave modify the path variable to include the directory where Ghostscript's command line programs resides.
For the latter, to following lines may be placed in the ~/.octaverc file (where ~ indicates the user's home folder). The variable gs_path should be set to the Destination directory where Ghostscript was installed.
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
In this case, the value of gs_path has been set to the location of Ghostscript's command line program for the GPL's 8.15 version of Ghostscript. The location for other versions may differ. Please determine the location of the installed Ghostscript command line program and make the needed adjustments to these instructions.
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.
- Add the Destination directory where Ghostscript is installed and confirm the change by clickiing OK, OK, OK.
If the 64 bit version of Ghostscript is installed, Octave will not automatically detect it. To use the 64 bit version an option telling Octave about it must be passed to the print command. For example to produce PDF output for a figure, using the 64 bit version of Ghostscript, the command below may be used.
print -Ggswin64c.exe figure.pdf
At this point most of Octave's printing functionality should work. When output is produced using the 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 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 ~/.octaverc file.
[edit]Using the Visual C++ compiler with Octave
As of version 3.6.1, the Microsoft Visual C++ compiler is not automatically detected. If you need to use it from octave (for instance to compile a MEX, OCT file, and building packages), then you must configure your system by updating the appropriate environment variables: %PATH%, %INCLUDE% and %LIB%. One way to achieve this easily is to call the vcvarsall.bat script (from the Visual C++ installation directory) prior executing octave. You can for instance automate this by creating a batch script with the following content (adapt paths to your actual installation):
call "C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" "C:\Octave-3.6.1\bin\octave.exe"
[edit]Octave 3.6.4
[edit]Download
[edit]Content
- Octave 3.6.4
- OpenBLAS-0.2.2 (dynamic architectures, up to 4 threads)
- ATLAS 3.8.4 single-threaded and multi-threaded (2 threads)
- All required libraries
- Gnuplot 4.4.4
- FLTK
- 82 packages from Octave-Forge (Must be installed through the Octave installer, see README: 3. Content)
[edit]Octave 3.6.2
[edit]Download
[edit]Content
- Octave 3.6.2
- OpenBLAS-0.1.1 (dynamic architectures, up to 4 threads)
- ATLAS 3.8.4 single-threaded and multi-threaded (2 threads)
- All required libraries
- QtHandles
- Octave GUI (experimental, compiled from development sources)
- Gnuplot 4.4.4
- 72 packages from Octave-Forge (see README: 3. Content)
[edit]Octave 3.6.1
[edit]Download
[edit]Content
- Octave 3.6.1
- ATLAS 3.8.4 single-threaded (SSE/SSE2/SSE3) and multi-threaded (SSE3, 2 threads)
- All required libraries
- QtHandles
- Octave GUI (experimental, compiled from development sources)
- Gnuplot 4.4.4
- 72 packages from Octave-Forge
[edit]Building from source
Instructions are available from the Octave-Forge repository, see [1]
[edit]Alternative
In addition to the instructions provided in the Octave manual and Octave-Forge repository, a basic toolkit for building Octave in windows using the MSVC compiler has been produced by Michael Goffioul. It consists of a set of scripts that can be used to compile Octave and its dependencies.
A pre-compiled (with VS2010) version of everything has also been provided, so it is not necessary to recompile everything from scratch. The files can be found at:http://dl.dropbox.com/u/45539519/octave-build2.zip and http://dl.dropbox.com/u/45539519/VC10Libs.zip
Note that this is not a enterprise-level SDK, so don't try to start an enterprise with it.