Contact | License

# 1303 - Precompiled Header option '%s' in '%s' invalid. Only allowed on Precompiled Header.

Description
An option to create Precompiled Headers was specified on a non-precompiled header file. Compilation will not work correctly. To use Precompiled Headers in a library, use the various .PCH* options.
Example
Config:
.Compiler = 'cl.exe' ObjectList( 'test' ) { .CompilerOutputPath = 'tmp/' .CompilerOptions = '%1 /Fo%2 /Yc' // Not valid to use /Yc here }
Output:
c:\test\fbuild.bff(3):(1) FASTBuild Error #1303 - ObjectList() - Precompiled Header option '/Yc' in 'CompilerOptions' invalid. Only allowed on Precompiled Header. ObjectList( 'test' ) ^ \--here
.Compiler = 'cl.exe' ObjectList( 'test' ) { .CompilerOutputPath = 'tmp/' .CompilerOptions = '%1 /Fo%2' .PCHOptions = .CompilerOptions + ' /Yc...' // Use various PCH options }