-----BEGIN PGP SIGNED MESSAGE-----

Moin,

I am trying to write a wrapper for an C++ library. Here is the error:

[EMAIL PROTECTED]:~/perl/Irrlicht/Games-Irrlicht-0.01> make
g++ -c   -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE 
- -D_FILE_OFFSET_BITS=64 -O2   -DVERSION=\"0.01\" -DXS_VERSION=\"0.01\" -fpic 
"-I/usr/local/lib/perl5/5.8.2/i686-linux/CORE"   Irrlicht.c
Irrlicht.c: In function `void XS_Games__Irrlicht_my_init(CV*)':
Irrlicht.c:30: error: parse error before `PL_stack_base'
make: *** [Irrlicht.o] Error 1

I have attached three files:

        * Makefile.PL (build by looking at the older C++ thread on this list)
        * Irrlicht.xs file
        * Irrlicht.c file resulting from that

I tried to update MakeMaker from 5.8.2 (v6.17) to v6.21, but this did not 
help. I am currently updating gcc from 3.3.2 to 3.3.3 - but I suspect this 
will not help (e.g. be the cause). I can compile other Perl modules just 
fine. So it is probably something in my code or Makefile.PL.

I am stumped as to what the problem is - it is probably something simple. 
However, google did not return any usefull results for that error message.

The full module (in its non-working early stage) can be found here:

        http://bloodgate.com/perl/packages/devel/Games-Irrlicht-0.01.tar.gz

The header files neccessary to compile it:

        http://irrlicht.sf.net/ (look for the download section and get v0.5)

I can make the .h files available seperatedly if this is wanted.

Thank you in advance,

Tels

- -- 
 Signed on Fri Feb 27 19:30:52 2004 with key 0x93B84C15.
 Visit my photo gallery at http://bloodgate.com/photos/
 PGP key on http://bloodgate.com/tels.asc or per email.

 "I am soo clumsy today." *crash*

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)
Comment: When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl.

iQEVAwUBQD+OdHcLPEOTuEwVAQGgxAf/VglgX1cfWW+42Cb2DKsi15l0mmSAx3qB
yD7RlkKI13HJOtdYtNbT66r/SZ1YweHxiVNhF9v8TxaQGZKO04IrierZ3Wgnvq8d
EAG0FcvxzROukaQ+0GO7NgvB313Oe7qWXHLfT47U03CTSUQ6oMumdtjUmnNjTbNk
XtD57rAEPFrWd+FbXmu+42nFsLerYny9oeHtW+TETrNUY0MVTFXlFaLfFiKMyoFh
MmRRjzQDLs0rPbqCqX5MW6RReAE//XTOU1U+sDEZ+d+U5cocm/rQl7OFwYQauooC
IUnaNkG0grhT3s0pEyVHJ9vVQRjrdO6IPzPdtlHAL0KqQh+y+X6mqQ==
=vuJC
-----END PGP SIGNATURE-----
use ExtUtils::MakeMaker;

# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.

WriteMakefile(
	'NAME'		=> 'Games::Irrlicht',
	'VERSION_FROM'	=> 'lib/Games/Irrlicht.pm',
	'PREREQ_PM'	=> {
			 Config::Simple => '4.55',
			},
	($] >= 5.005 ?
		(ABSTRACT_FROM  => 'lib/Games/Irrlicht.pm',
                AUTHOR         => 'Tels <http://bloodgate.com/>') : ()),
	'CC'		=> 'g++',
	'LD'		=> 'g++',
	'OPTIMIZE'	=> '-O2',
	'LIBS'		=> [ '-lIrrlicht' ],
	'DEFINE'	=> '', # e.g., '-DHAVE_SOMETHING'
	'INC'		=> '',
#	'XSOPT'		=> '-C++', 
#	'OBJECT'	=> '', 
);
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
#include <Irrlicht/irrlicht.h>

using namespace irr;

/*
Games::Irrlicht XS code (C) by Tels <http://bloodgate.com/perl/> 
*/

MODULE = Games::Irrlicht		PACKAGE = Games::Irrlicht

PROTOTYPES: DISABLE

SV*
my_init(SV* class)
    CODE:

      RETVAL = newSViv(1); 		/* return 1 for ok */
    OUTPUT:
      RETVAL

/*
 * This file was generated automatically by xsubpp version 1.9508 from the
 * contents of Irrlicht.xs. Do not edit this file, edit Irrlicht.xs instead.
 *
 *	ANY CHANGES MADE HERE WILL BE LOST!
 *
 */

#line 1 "Irrlicht.xs"
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
#include <Irrlicht/irrlicht.h>


//#using namespace irr;

/*
Games::Irrlicht XS code (C) by Tels <http://bloodgate.com/perl/> 
*/

#line 22 "Irrlicht.c"
XS(XS_Games__Irrlicht_my_init); /* prototype to pass -Wmissing-prototypes */
XS(XS_Games__Irrlicht_my_init)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Games::Irrlicht::my_init(class)");
    {
	SV *	RETVAL;
	SV*	class = ST(0);
#line 20 "Irrlicht.xs"
      RETVAL = newSViv(1); 		/* return 1 for ok */
#line 34 "Irrlicht.c"
	ST(0) = RETVAL;
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}

#ifdef __cplusplus
extern "C"
#endif
XS(boot_Games__Irrlicht); /* prototype to pass -Wmissing-prototypes */
XS(boot_Games__Irrlicht)
{
    dXSARGS;
    char* file = __FILE__;

    XS_VERSION_BOOTCHECK ;

        newXS("Games::Irrlicht::my_init", XS_Games__Irrlicht_my_init, file);
    XSRETURN_YES;
}

Reply via email to