---
name: "objfw-compile"
section: "1"
platform: "linux"
package: "libobjfw1-dev"
version: "1.3-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/objfw-compile"
---

# objfw-compile(1)

compile simple projects using ObjFW

## NAME

objfw-compile - compile simple projects using ObjFW

## SYNOPSIS

**objfw-config** \[**options**\] **-o** *outname* *sources*

## DESCRIPTION

**objfw-compile** is a program to compile simple projects using ObjFW.

## OPTIONS

- **-o** ***outname***

  Specify the output name (not the file name!).

- **--arc**

  Use automatic reference counting.

- **--lib** ***version***

  Compile a static library (with the specified version) instead of an application.

- **--plugin**

  Compile a plugin instead of an application.

- **--package** ***name***

  Use the specified package.

- **--builddir** ***dir***

  Place built objects into the specified directory.

- **-D*define***, **-D** ***define***

  Pass the specified define to the compiler.

- **-framework** ***framework***

  Pass the specified -framework argument to the linker (macOS / iOS only).

- **-f*flag***

  Pass the specified -f flag to the compiler.

- **-F*dir***, **-F** ***dir***

  Pass the specified -F flag to the linker (macOS / iOS only).

- **-g*flag***

  Pass the specified -g flag to the compiler.

- **-I*dir***, **-I** ***dir***

  Pass the specified -I flag to the compiler.

- **-l*lib***, **-l** ***lib***

  Pass the specified -l flag to the linker.

- **-L*dir***, **-L** ***dir***

  Pass the specified -L flag to the linker.

- **-m*flag***

  Pass the specified -m flag to the compiler.

- **-O*level***

  Pass the specified -O flag to the compiler.

- **-pthread**

  Pass -pthread to the compiler and linker.

- **-std=*lang***

  Pass the specified -std= flag to the compiler.

- **-Wl,*flag***

  Pass the specified -Wl, flag to the linker.

- **-W*warning***

  Pass the specified -W flag to the compiler.

- **--help**

  Show the help.

## EXAMPLES

Compile a program with two source files:

	objfw-compile -o myprog MyProg.m SomeClass.m

Compile a library with library version 1.0:

	objfw-compile --lib 1.0 -o mylib Class1.m Class2.m

## SEE ALSO

[*objfw-config*(1)](/objfw-config/1.md)
