A Basic Application

Overview

This configuration shown here shows how to define a basic executable application, comprising of several libraries linked together into an executable. Additionally, it defines an 'all' target for convenience. When no target is specified on the command line, the default of 'all' is assumed. This way calling fbuild.exe with no arguments will cause the executable to build.

Configuration
; MSVC Toolchain ;--------------- .Compiler = 'Bin\VC\cl.exe' .Librarian = 'Bin\VC\lib.exe' .Linker = 'Bin\VC\link.exe' .CompilerOptions = '%1 /Fo%2 /c /Z7' .LibrarianOptions = '/NODEFAULTLIB /OUT:%2 %1' .LinkerOptions = '/NODEFAULTLIB /OUT:%2 %1 /SUBSYSTEM:CONSOLE' ; Libraries ;---------- Library( 'libA' ) { .CompilerInputPath = 'Src\LibA\' .CompilerOutputPath= 'Out\LibA\' .LibrarianOutput = 'Out\LibA\libA.lib' } Library( 'libB' ) { .CompilerInputPath = 'Src\LibB\' .CompilerOutputPath= 'Out\LibB\' .LibrarianOutput = 'Out\LibB\libB.lib' } ; Executables ;------------ Executable( 'myExe' ) { .Libraries = { 'libA', 'libB' } .LinkerOutput = 'Out\MyExe.exe' } ; 'all' ;------- Alias( 'all' ) { .Targets = { 'myExe' } }