Giter Club home page Giter Club logo

perl-inline-cpp's Introduction

INTRODUCTION:

Inline::CPP -- Write Perl subroutines and classes in C++.

Inline::CPP lets you write Perl subroutines and classes in C++. You
don't have to learn XS or SWIG, you can just put code right "inline"
in your source.

Example:

   use Inline CPP => <<'END';

   class JAxH {
     public:
       JAxH(char *x);

       SV* data();
     private:
       SV *dat;
   };

   JAxH::JAxH(char *x) { dat = newSVpvf("Just Another %s Hacker", x); }
   SV* JAxH::data() { return dat; }

   END

   print JAxH->new('Inline')->data(), "\n";

When run, this complete program prints:

   Just Another Inline Hacker.


-----------------------------------------------------------------------------
INSTALLATION:

It should go without saying, but you will need a C++ compiler on your system.
The C++ compiler should be of the same flavor as the C compiler used to build
perl itself.  If you're using GNU C++, be sure that you have the g++ front
end installed (it isn't installed by default on some Linux distros, for
example).  If you cannot execute 'g++ -v' from the command prompt, or some
variation for your specific C++ compiler,

*** DISABLE HARNESS_OPTIONS=j9 ***

If you have the HARNESS_OPTIONS environment variable set to run tests
concurrently in multiple processes, the test suite will attempt to invoke
the C++ compiler multiple times concurrently.  Recent versions of Inline and
Inline::C have made progress on stamping out race conditions, but YMMV for now.

Also, some smoke testers run their testing in parallel, which may also be
problematic, and may result in FAIL reports for reasons that will never
occur in the real world.

See Makefile.PL, or the META.* files for lists of dependencies and minimum
dependency version numbers.  Minimum Perl version is now 5.8.1, same as Inline.

To install Inline::CPP do this:

perl Makefile.PL
make
make test
make install

(On ActivePerl for MSWin32, use nmake instead of make.)
(On Strawberry Perl you may use dmake instead.)

As Makefile.PL runs you will be prompted for what C++ compiler and library to
use.  Accepting the default should work in nearly every case (and if it
doesn't, let me know).

-----------------------------------------------------------------------------
INFORMATION:

- For more information on Inline::CPP see 'perldoc Inline::CPP'.
- For information about Inline.pm, see 'perldoc Inline'.
- For information about Inline::C (of which this is a subclass)
  see 'perldoc Inline::C', as well as 'perldoc Inline::C-Cookbook'.
- For information on using Perl with C or C++, see 'perldoc perlapi'

The Inline mailing list is [email protected]. Send mail to
[email protected] to subscribe.

This module's development is under version control with Git, hosted on Github
at https://github.com/daoswald/Inline-CPP

Please send questions and comments to "David Oswald" <[email protected]>

Copyright (c) 2003 - 2014, Neil Watkiss, David Oswald. All Rights Reserved.

perl-inline-cpp's People

Contributors

daoswald avatar mohawk2 avatar wbraswell avatar ingydotnet avatar jimav avatar nanis avatar plicease avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.