C::TCC - An interface to the TCC(Tiny C Compiler)


C-TCC documentation  | view source Contained in the C-TCC distribution.

Index


NAME

Top

C::TCC - An interface to the TCC(Tiny C Compiler)

SYNOPSIS

Top

  use C::TCC;
  my $tcc = C::TCC->new();
  $tcc->compile_string('int main(){printf("Hello World.\n"); return 0;}');
  $tcc->run();

DESCRIPTION

Top

The perl module TCC provides an interface to the TCC(Tiny C Compiler) See http://fabrice.bellard.free.fr/tcc/ for more information on TCC.

METHODS

Top

new Create a new TCC compilation context.

add_include_path Add include path

add_sysinclude_path Add in system include path

define_symbol Define preprocessor symbol 'sym'. Can put optional value

undefine_symbol Undefine preprocess symbol 'sym'

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

compile_string Compile a string containing a C source. Return non zero if error.

set_output_type set output type. MUST BE CALLED before any compilation

TCC_OUTPUT_MEMORY

TCC_OUTPUT_EXE

TCC_OUTPUT_DLL

TCC_OUTPUT_OBJ

TCC_OUTPUT_PREPROCESS

output_file output an executable, library or object file. DO NOT call relocate() method before.

SEE ALSO

Top

TCC(Tiny C Compiler) is created by Fabrice Bellard.

http://fabrice.bellard.free.fr/tcc/

AUTHOR

Top

Tsukasa Hamano <hamano@cpan.org>

COPYRIGHT AND LICENSE

Top


C-TCC documentation  | view source Contained in the C-TCC distribution.