2.2.4.38.10 Project::Compile

Description

Compile a source file

Syntax

BOOL Compile( LPCSTR lpcszFileName, int * lpResult = NULL )

Parameters

lpcszFileName
[input]name of file to load and compile
lpResult
[input]Result of compilation returned by Code Builder

Return

TRUE if compilation either successful or not needed

FALSE otherwise

Examples

EX1

//Compile a source file 
void Project_Compile_ex1()
{
    Project.Compile("c:\test.c");
}

Remark

Loads and compile Origin C file

Possible values for result:

0, Compiled successfully

1, File not found

2, Compilation failed

3, File is found but can not be loaded

4, Unable to load and compile internal.c

5, File is already loaded and compiled

7, Unknown error

See Also

Header to Include

origin.h