mb_compile

Previous  Next

 

status_t mb_compile( mb_interpreter_t* s, const char* strFileName )

 


 

Compiles the currently loaded file or string to a MyBASIC2 Compiled file.  This is not a true executable file.  It is an object file that has been parsed for faster execution and to be able to protect the file from reverse engineering or modifications.

 

Example

 

mb_interpreter_t*        bas = NULL;

char                        strMyFile[_MAX_PATH];

 

printf( "_Enter File: " );

scanf( "%s", strMyFile );

 

mb_open( &bas );

 

if ( mb_load_file( bas, strMyFile ) == MB_FUNC_OK )

{

  // Compile file to same name but with .BAC extension

  mb_compile( bas, NULL );

}

mb_close( &bas )