deimos.libtcc

Undocumented in source.

Members

Enums

TCC_OUTPUT_MEMORY
anonymousenum TCC_OUTPUT_MEMORY
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.

Functions

tcc_add_file
int tcc_add_file(TCCState* s, char* filename)

Add a file (C file, dll, object, library, ld script). Return -1 if error.

tcc_add_include_path
int tcc_add_include_path(TCCState* s, char* pathname)

Add include path

tcc_add_library
int tcc_add_library(TCCState* s, char* libraryname)

The library name is the same as the argument of the '-l' option

tcc_add_library_path
int tcc_add_library_path(TCCState* s, char* pathname)

Equivalent to -Lpath option

tcc_add_symbol
int tcc_add_symbol(TCCState* s, char* name, void* val)

Add a symbol to the compiled program

tcc_add_sysinclude_path
int tcc_add_sysinclude_path(TCCState* s, char* pathname)

Add const system include path

tcc_compile_string
int tcc_compile_string(TCCState* s, char* buf)

Compile a string containing a C source. Return -1 if error.

tcc_define_symbol
void tcc_define_symbol(TCCState* s, char* sym, char* value)

Define preprocessor symbol 'sym'. Can put optional value

tcc_delete
void tcc_delete(TCCState* s)

Free a TCC compilation context

tcc_get_symbol
void* tcc_get_symbol(TCCState* s, char* name)

Return symbol value or NULL if not found

tcc_new
TCCState* tcc_new()

Create a new TCC compilation context

tcc_output_file
int tcc_output_file(TCCState* s, char* filename)

Output an executable, library or object file. DO NOT call tcc_relocate() before.

tcc_relocate
int tcc_relocate(TCCState* s1, void* ptr)

Do all relocations (needed before using tcc_get_symbol())

tcc_run
int tcc_run(TCCState* s, int argc, char** argv)

Link and run main() function and return its value. DO NOT call tcc_relocate() before.

tcc_set_error_func
void tcc_set_error_func(TCCState* s, void* error_opaque, void function(void* opaque, const char* msg) error_func)

Set error/warning display callback

tcc_set_lib_path
void tcc_set_lib_path(TCCState* s, char* path)

Set CONFIG_TCCDIR at runtime

tcc_set_options
int tcc_set_options(TCCState* s, char* str)

Set options as from command line (multiple supported)

tcc_set_output_type
int tcc_set_output_type(TCCState* s, int output_type)

Set output type. MUST BE CALLED before any compilation

tcc_undefine_symbol
void tcc_undefine_symbol(TCCState* s, char* sym)

Undefine preprocess symbol 'sym'

Manifest constants

TCC_RELOCATE_AUTO
enum TCC_RELOCATE_AUTO;

Possible values for 'ptr': - TCC_RELOCATE_AUTO : Allocate and manage memory internally - NULL : return required memory size for the step below - memory address : copy code to memory passed by the caller returns -1 if error.

Structs

TCCState
struct TCCState
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.

Meta