Description
Compiles all the objects in the libraries included on the library list. If necessary, the compilation is done in multiple passes to resolve circular dependencies.
Syntax
INT PBORCA_ApplicationRebuild ( HPBORCA hORCASession, PBORCA_REBLD_TYPE eRebldType, PBORCA_ERRPROC pCompErrProc, LPVOID pUserData );
Argument |
Description |
---|---|
hORCASession |
Handle to previously established ORCA session. |
eRebldType |
A value of the PBORCA_REBLD_TYPE enumerated data type specifying the type of rebuild. Values are: PBORCA_FULL_REBUILD PBORCA_INCREMENTAL_REBUILD PBORCA_MIGRATE PBORCA_3PASS |
pCompErrorProc |
Pointer to the PBORCA_ApplicationRebuild callback function. The callback function is called for each error that occurs as the objects are compiled. The information ORCA passes to the callback function is error level, message number, message text, line number, and column number, stored in a structure of type PBORCA_COMPERR. The object name and script name are part of the message text. If you do not want to use a callback function, set pCompErrorProc to 0. |
pUserData |
Pointer to user data to be passed to the PBORCA_CompileEntryImport callback function. The user data typically includes the buffer or a pointer to the buffer in which the callback function stores the error information as well as information about the size of the buffer. If you are not using a callback function, set pUserData to 0. |
Return value
INT. Typical return codes are:
Return code |
Description |
---|---|
0 PBORCA_OK |
Operation successful |
-1 PBORCA_INVALIDPARMS |
Invalid parameter list |
-13 PBORCA_CURRAPPLNOTSET |
Current application not set |
Usage
You must set the library list and current application before calling this function.
If you use the compile functions, errors can occur because of the order in which the objects are compiled. If two objects refer to each other, then simple compilation will fail. Use PBORCA_ApplicationRebuild to resolve errors due to object dependencies. PBORCA_ApplicationRebuild resolves circular dependencies with multiple passes through the compilation process.
The rebuild types specify how objects are affected. Choices are:
Incremental rebuild
Updates all the objects and libraries referenced by any objects that have been changed since the last time you built the application.
Full rebuild
Updates all the objects and libraries in your application.
Migrate
Updates all the objects and libraries in your application to the current version. Only applicable when the objects were built in an earlier version.
Examples
This example recompiles all the objects in the libraries on the current library list.
Each time an error occurs, PBORCA_ApplicationRebuild calls the callback CompileEntryErrors. In the code you write for CompileEntryErrors, you store the error messages in the buffer pointed to by lpUserData:
PBORCA_ERRPROC fpError; int nReturnCode; fpError = (PBORCA_ERRPROC) ErrorProc; nReturnCode = PBORCA_ApplicationRebuild( lpORCA_Info->hORCASession, PBORCA_FULL_REBUILD, fpError, lpUserData);
For more information about setting up the data buffer for the callback, see Content of a callback function and the example for PBORCA_LibraryDirectory.
In these examples, session information is saved in the data structure ORCA_Info, shown in About the examples.
See also