XPRMcompmod, XPRMcompmodsec
XPRMcompmod, XPRMcompmodsec |
Purpose
Synopsis
int XPRMcompmod(const char *options, const char *srcfile, const char *dstfile, const char *userc);
int XPRMcompmodsec(const char *options, const char *srcfile, const char *dstfile, const char *userc, const char *passfile, const char *privkey, const char *kfile);
Arguments
options
|
Compilation options (may be
NULL, options may be separated by spaces or
'-' symbols):
|
||||||||||||||||||||||||||
scrfile
|
Name of the source file
|
||||||||||||||||||||||||||
dstfile
|
Name of the destination file (may be
NULL)
|
||||||||||||||||||||||||||
userc
|
|||||||||||||||||||||||||||
passfile
|
Password or password file (for encryption with a password)
|
||||||||||||||||||||||||||
privkey
|
Private key file (for BIM file signing)
|
||||||||||||||||||||||||||
kfile
|
File of public keys (for encryption with public keys)
|
Return value
0
|
Function executed sucessfully
|
1
|
Parsing phase has failed (syntax error or file access error)
|
2
|
Error in compilation phase (a semantic error has been detected)
|
3
|
Error writing the output file
|
4
|
License error (compiler not authorized)
|
Further information
1. This function compiles a given model source file into a binary model
file (BIM
file) that is required as input to function
XPRMloadmod for executing the model. The second form of the function will be used to generate encrypted and/or signed BIM files.
2. The source file name may contain environment variable references using the notation
${varname} (for example, `
${XPRESSDIR}/examples/mymodel') that are expanded to generate the actual name. If no destination file name is provided, the output file takes the same name as the source file with the extension
.bim. Note that the empty string (
i.e.
"") is interpreted as the standard input for
srcfile and as the standard output for
dstfile.
3. The argument
kfile is a list of public key files (
i.e. each line of the file is a key file name): when encrypting a file, the encryption is performed for each of the listed public keys such that the BIM file can be decrypted by any of the corresponding private keys.
4. When prefixes provided via
bx or
ix are quoted with double quotes, backslashes are interpreted such that special characters can be included in the string. It is therefore required to double this symbol when it has to be included (
e.g.
'bx="C:\\mydir"').
Related topics