h2xs -AXc -n NewModule
####
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/NewModule....Warning: No Inline C++ functions or classes bound to Perl
Check your C++ for Inline compatibility.
# Failed test (t/NewModule.t at line 9)
# Tried to use 'NewModule'.
# Error: make[1]: Entering directory `/users/nirf/perlTrials/NewModule/_Inline/build/NewModule_b1a3'
# /usr/bin/perl /usr/lib/perl5/5.8.5/ExtUtils/xsubpp -typemap /usr/lib/perl5/5.8.5/ExtUtils/typemap NewModule_b1a3.xs > NewModule_b1a3.xsc && mv NewModule_b1a3.xsc NewModule_b1a3.c
# g++ -c -I/users/nirf/perlTrials/NewModule/t -D_REENTRANT -D_GNU_SOURCE -DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe -m32 -march=i386 -mtune=pentium4 -DVERSION=\"0.00\" -DXS_VERSION=\"0.00\" -fPIC "-I/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE" NewModule_b1a3.c
# In file included from /usr/lib/gcc/i386-redhat-linux/3.4.6/../../../../include/c++/3.4.6/backward/iostream.h:31,
# from NewModule_b1a3.xs:2:
# /usr/lib/gcc/i386-redhat-linux/3.4.6/../../../../include/c++/3.4.6/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the header for the header for C++ includes, or instead of the deprecated header . To disable this warning use -Wno-deprecated.
# NewModule_b1a3.xs:15: error: expected constructor, destructor, or type conversion before '=' token
# make[1]: *** [NewModule_b1a3.o] Error 1
# make[1]: Leaving directory `/users/nirf/perlTrials/NewModule/_Inline/build/NewModule_b1a3'
#
# A problem was encountered while attempting to compile and install your Inline
# CPP code. The command that failed was:
# make > out.make 2>&1
#
# The build directory was:
# /users/nirf/perlTrials/NewModule/_Inline/build/NewModule_b1a3
#
# To debug the problem, cd to the build directory, and inspect the output files.
#
# at /users/nirf/perlTrials/NewModule/blib/lib/NewModule.pm line 11
# BEGIN failed--compilation aborted at /users/nirf/perlTrials/NewModule/blib/lib/NewModule.pm line 11.
# Compilation failed in require at (eval 1) line 2.
# Looks like you failed 1 tests of 1.
t/NewModule....dubious
Test returned status 1 (wstat 256, 0x100)
DIED. FAILED test 1
Failed 1/1 tests, 0.00% okay
Failed Test Stat Wstat Total Fail Failed List of Failed
-------------------------------------------------------------------------------
t/NewModule.t 1 256 1 1 100.00% 1
Failed 1/1 test scripts, 0.00% okay. 1/1 subtests failed, 0.00% okay.
make: *** [test_dynamic] Error 2
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
####
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
package NewModule;
use 5.008005;
use strict;
use warnings;
use lib '/usr/lib/perl5/vendor_perl/5.8.0';
use lib '/users/nirf/perlTrials/cpanModulesInstallation/lib/perl5/site_perl/5.8.0';
use lib '/users/nirf/perlTrials/cpanModulesInstallationInline/lib/perl5/site_perl/5.8.5';
use Inline CPP => Config => INC => '-l/users/nirf/perlTrials/inlineExample';
use Inline CPP => Config => MYEXTLIB => '/users/nirf/perlTrials/inlineExample/libmain.so';
use Inline CPP => 'END';
use Inline CPP => Config => ENABLE => STD_IOSTREAM;
require Exporter;
our @ISA = qw(Exporter);
# Items to export into callers namespace by default. Note: do not export
# names by default without a very good reason. Use EXPORT_OK instead.
# Do not simply export all your public functions/methods/constants.
# This allows declaration use NewModule ':all';
# If you do not need this, moving things directly into @EXPORT or @EXPORT_OK
# will save memory.
our %EXPORT_TAGS = ( 'all' => [ qw(
) ] );
our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
our @EXPORT = qw(
);
our $VERSION = '0.01';
__END__
__CPP__
#include "main.h"
char GlobalArr[13] = {'G','l','o','b','a','l',' ','a','r','r','a','y','\0',};
MyClass myGlobalInstance(GlobalArr) ;
int add(int x, int y)
{
char arr[7]={'i','n',' ','a','d','d','\0'};
MyClass mc(arr);
myGlobalInstance.wow();
return x + y;
}
1;
# Below is stub documentation for your module. You'd better edit it!
=head1 NAME
NewModule - Perl extension for blah blah blah
=head1 SYNOPSIS
use NewModule;
blah blah blah
=head1 DESCRIPTION
Stub documentation for NewModule, created by h2xs. It looks like the
author of the extension was negligent enough to leave the stub
unedited.
Blah blah blah.
=head2 EXPORT
None by default.
=head1 SEE ALSO
Mention other useful documentation such as the documentation of
related modules or operating system documentation (such as man pages
in UNIX), or any relevant external documentation such as RFCs or
standards.
If you have a mailing list set up for your module, mention it here.
If you have a web site set up for your module, mention it here.
=head1 AUTHOR
Nir Frenkel, Enirf@localdomainE
=head1 COPYRIGHT AND LICENSE
Copyright (C) 2008 by Nir Frenkel
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.8.5 or,
at your option, any later version of Perl 5 you may have available.
=cut
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&