hi

I use Inline::CPP to develop a perl program which is embedded C++, the code is below:
//**************************************
#!/usr/bin/perl
use Inline CPP;
use Inline CPP => Config => INC => '-I/opt/ems/scada/src/dbAPI/include -I/opt/ems/scada/src/dbUtil/include -I/opt/ems/scada/src/sesUtil/include', LIBS => '-L/opt/ems/scada/lib -lcmdl -lDbUtil -lSesUtil -lDbAPI';

__END__
__CPP__
using namespace  std;

#include "dbAPI.H"
#include "sesUtilInit.H"
dbAPI *db=new  dbAPI();
//***************************************
when I make it, somethis is wrong. But I can not find the bug. I am not familiar with perl and XS. If posible, I wish someone can give me some advice. thanks

/*******************  Make information  ***
ntst_pl_34eb.xs:20: error: ISO C++ forbids declaration of `MODULE' with no type
ntst_pl_34eb.xs:20: error: `ntst_pl_34eb' was not declared in this scope
ntst_pl_34eb.xs:20: error: parse error before `=' token

/*******************************

/*************   xs  file
#ifndef bool
#include <iostream>
#endif
extern "C" {
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
#include "INLINE.h"
}
#ifdef bool
#undef bool
#include <iostream>
#endif
using namespace  std;

#include "dbAPI.H"
#include "sesUtilInit.H"
dbAPI *db=new dbAPI();MODULE = ntst_pl_34eb PACKAGE = main PROTOTYPES: DISABLE

/************************************************

邬明辉  ( Minghui Wu )

_________________________________________________________________
与联机的朋友进行交流,请使用 MSN Messenger: http://messenger.msn.com/cn

Reply via email to