Tcc(const char *dllName)
Tcc constructor. dllName.contains the file with full path where .DLL file is located. In Posix implementation it is not necessary to include this file.
void Compile(const char *my_program)
Compiles a C script. my_program.contains the full C script source code.
void AddSymbol(const char *funName, void *fun)
Adds a function in the main program that can be called from the C script.
funName is the function name as it will be used in the C script
fun.is a pointer to the function in the main program.
As many functions as necessary can be called from the main program.
Remember to declare them in the C script.
void Link(const char *fileName = 0)
Links all program symbols.
If defined SetOutputExe(), fileName.defines the file name where the executable file is going to be copied.
Output executable format depends on the operating system where the main program has been compiled:
In Posix the format is ELF
In Windows the format is PE-COFF
Both are the native program formats so that they can be run from a simple terminal window in the native OS
String GetProgram()
Returns the C script source.
void *GetSymbol(const char *funName)
Returns the address of a C Script function to be called from the main program.
funName.contains the name of the function in the C script.
bool AddIncludePath(const char *path)
Sets a directory path where include files referenced in C script source are located.
This function can be called as many times as necessary for different directories.
The original include files are located under Bazaar/plugin/tcc/include directory..
bool AddLibraryPath(const char *path)
Sets a directory path where library files referenced in C script source are located.
This function can be called as many times as necessary for different directories.
The original library files are located under Bazaar/plugin/tcc/lib directory..
void SetOutputExe()
Defines that the program will be output to an executable file indicated in Link()
void SetOutputMemory()
Defines that the program will be run in memory (option by default)
C script function list. This functions can be called from C script
|
|
void throw(const char *path)
Throws an Exc exception with message path.
|