---
name: "mkoctfile-3.2.4"
section: "1"
platform: "linux"
package: "octave3.2-headers"
version: "3.2.4-8"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/mkoctfile-3.2.4"
---

# mkoctfile-3.2.4(1)

Compile dynamic-load modules for GNU Octave

## NAME

mkoctfile - Compile dynamic-load modules for GNU Octave

## SYNOPSIS

**mkoctfile** \[-IDIR\] \[-DDEF\] \[-lLIB\] \[-LDIR\] \[-M\|--depend\]  \[-c\] \[-o FILE\|--output FILE\] \[-p VAR\|--print VAR\] \[-s\|--strip\]  \[-v\|--verbose\] \[-h\|-?\|--help\] *file* ...

## DESCRIPTION

*mkoctfile* is used to compile source C, C++ or Fortran source code in dynamically loadable  *.oct* file for  [**octave**(1)](/octave/1.md).

## OPTIONS

*mkoctfile* accepts the following options:

- **-IDIR**

  Add include directory DIR to compile commands.

- **-DDEF**

  Add definition DEF to compiler call.

- **-lLIB**

  Add library LIB to link command.

- **-LDIR**

  Add library directory DIR to link command.

- **-M\|--depend**

  Generate dependency files (.d) for C and C++ source files.

- **-c**

  Compile but do not link.

- **-o FILE\|--output FILE**

  Output file name; default extension is .oct (or .mex if --mex is specified) unless linking a stand-alone executable.

- **-p VAR\|--print VAR**

  Print configuration variable VAR.  Recognized variables are:

      ALL\_CFLAGS                FFTW\_LIBS     \
       ALL\_CXXFLAGS              FLIBS       \
       ALL\_FFLAGS                FPICFLAG      \
       ALL\_LDFLAGS               INCFLAGS      \
       BLAS\_LIBS                 LDFLAGS             \
       CC                        LD\_CXX              \
       CFLAGS                    LD\_STATIC\_FLAG\
       CPICFLAG                  LFLAGS              \
       CPPFLAGS                  LIBCRUFT      \
       CXX                       LIBOCTAVE     \
       CXXFLAGS                  LIBOCTINTERP  \
       CXXPICFLAG                LIBREADLINE   \
       DEPEND\_EXTRA\_SED\_PATTERN  LIBS        \
       DEPEND\_FLAGS              OCTAVE\_LIBS   \
       DL\_LD                     RDYNAMIC\_FLAG \
       DL\_LDFLAGS                RLD\_FLAG      \
       F2C                       SED         \
       F2CFLAGS                  XTRA\_CFLAGS   \
       F77                       XTRA\_CXXFLAGS \
       FFLAGS

- **--link-stand-alone**

  Link a stand-alone executable file.

- **--mex**

  Assume we are creating a MEX file.  Set the default output extension to .mex.

- **-s\|--strip**

  Strip the output file.

- **-v\|--verbose**

  Echo commands as they are executed.

- **file**

  Compile or link file. Recognised file types are

      .c    C source\
       .cc   C++ source\
       .C    C++ source\
       .cpp  C++ source\
       .f    Fortran source\
       .F    Fortran source\
       .o    object file\
       .a    library file

## SEE ALSO

[**octave**(1)](/octave/1.md).

## AUTHOR

John W. Eaton \<jwe@octave.org\>

This manual page was contributed by Dirk Eddelbuettel \<edd@debian.org\> for the Debian GNU/Linux distribution but  may be used by others.
