-ObjN: Object File Name Specification

Group

OUTPUT

Scope

Compilation Unit

Syntax
  -ObjN=<file> 
  
Arguments

<file>: Object filename

Default

-ObjN=%(OBJPATH)\%n.o

Defines

None

Pragmas

None

Description

The object file has the same name as the processed source file, but with the *.o extension. This option allows a flexible way to define the object filename. It may contain special modifiers (see Using Special Modifiers). If <file> in the option contains a path (absolute or relative), the OBJPATH environment variable is ignored.

Example
  -ObjN=a.out 
  

The resulting object file is a.out. If the OBJPATH environment variable is set to \src\obj, the object file is \src\obj\a.out. fibo.c -ObjN=%n.obj

The resulting object file is fibo.obj.

  myfile.c -ObjN=..\objects\_%n.obj 
  

The object file is named relative to the current directory to ..\objects\_myfile.obj. The OBJPATH environment variable is ignored because the <file> contains a path.

See also

OBJPATH: Object File Path