NAME

C::TCC - Perl extension for TCC

SYNOPSIS

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

DESCRIPTION

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.

CONSTRUCTOR

new

Create a new TCC compilation context.

METHODS

add_include_path

Add include path

tcc_add_sysinclude_path

Add in system include path

tcc_define_symbol

Define preprocessor symbol 'sym'. Can put optional value

tcc_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.

run

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

SEE ALSO

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

AUTHOR

Tsukasa Hamano <hamano@klab.org>

COPYRIGHT AND LICENSE

Copyright (C) 2008 Tsukasa Hamano <hamano@klab.org>

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

2 POD Errors

The following errors were encountered while parsing the POD:

Around line 148:

You forgot a '=back' before '=head1'

Around line 182:

You forgot a '=back' before '=head1'