C-TCC
view release on metacpan or search on metacpan
lib/C/TCC.pm view on Meta::CPAN
1;
__END__
# Below is stub documentation for your module. You'd better edit it!
=head1 NAME
C::TCC - An interface to the TCC(Tiny C Compiler)
=head1 SYNOPSIS
use C::TCC;
my $tcc = C::TCC->new();
$tcc->compile_string('int main(){printf("Hello World.\n"); return 0;}');
$tcc->run();
=head1 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.
=head1 METHODS
=head2 new
Create a new TCC compilation context.
=head2 add_include_path
Add include path
=head2 add_sysinclude_path
Add in system include path
=head2 define_symbol
Define preprocessor symbol 'sym'. Can put optional value
=head2 undefine_symbol
Undefine preprocess symbol 'sym'
=head2 add_file
Add a file (either a C file, dll, an object, a library or an ld
script). Return -1 if error.
=head2 compile_string
Compile a string containing a C source. Return non zero if error.
=head2 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
=head2 output_file
output an executable, library or object file. DO NOT call
relocate() method before.
=head2 run
link and run main() function and return its value. DO NOT call
relocate() before.
=head1 SEE ALSO
TCC(Tiny C Compiler) is created by Fabrice Bellard.
http://fabrice.bellard.free.fr/tcc/
=head1 AUTHOR
Tsukasa Hamano <hamano@cpan.org>
=head1 COPYRIGHT AND LICENSE
Copyright (C) 2008 Tsukasa Hamano <hamano@cpan.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
=cut
( run in 0.507 second using v1.01-cache-2.11-cpan-71847e10f99 )