Ebola_Influenza has asked for the wisdom of the Perl Monks concerning the following question:
use 5.008003; use ExtUtils::MakeMaker; $CC = 'g++'; WriteMakefile ( NAME => 'MappedMaps', VERSION => '0.1.0.0', LDFROM => './MappedMaps.o', LIBS => ['-lgcc_s'], DEFINE => '-Dcplusplus', INC => '-I. -I/usr/include -I/usr/include/g++', CC => $CC, LD => $CC );
#swig -perl -c++ -Fstandard -v -Wall -I$(TOP_SRCDIR)/common -I/usr/inc +lude MappedMaps.i #h2xs -F'-Dcplusplus -I/usr/include/g++' MappedMaps.h -lgcc_s
janitored by ybiC: Balanced <code> tags around swig and h2xs command line examples, as per consideration.
-----------------------UPDATE--------------------------- ok, found the define where swig defines the following func. inside the swig _wrap code:then, the definition for SWIG_init is:#define SWIG_init boot_MappedMaps
XS(SWIG_init) { dXSARGS; int i; static int _init = 0; if (!_init) { for (i = 0; swig_types_initial[i]; i++) { swig_types[i] = SWIG_TypeRegister(swig_types_initial[i]); } _init = 1; } /* Install commands */ for (i = 0; swig_commands[i].name; i++) { newXS((char*) swig_commands[i].name,swig_commands[i].wrapper, +(char*)__FILE__); } /* Install variables */ for (i = 0; swig_variables[i].name; i++) { SV *sv; sv = perl_get_sv((char*) swig_variables[i].name, TRUE | 0x2); if (swig_variables[i].type) { SWIG_MakePtr(sv,(void *)1, *swig_variables[i].type,0); } else { sv_setiv(sv,(IV) 0); } swig_create_magic(sv, (char *) swig_variables[i].name, swig_va +riables[i].set, swig_variables[i].get); } /* Install constant */ for (i = 0; swig_constants[i].type; i++) { SV *sv; sv = perl_get_sv((char*)swig_constants[i].name, TRUE | 0x2); switch(swig_constants[i].type) { case SWIG_INT: sv_setiv(sv, (IV) swig_constants[i].lvalue); break; case SWIG_FLOAT: sv_setnv(sv, (double) swig_constants[i].dvalue); break; case SWIG_STRING: sv_setpv(sv, (char *) swig_constants[i].pvalue); break; case SWIG_POINTER: SWIG_MakePtr(sv, swig_constants[i].pvalue, *(swig_constant +s[i].ptype),0); break; case SWIG_BINARY: SWIG_MakePackedObj(sv, swig_constants[i].pvalue, swig_cons +tants[i].lvalue, *(swig_constants[i].ptype)); break; default: break; } SvREADONLY_on(sv); } SWIG_TypeClientData(SWIGTYPE_p_UGA_CAGT_PGML__MappedMaps, (void*) +"MappedMaps::MappedMaps"); ST(0) = &PL_sv_yes; XSRETURN(1); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: module builds but can't find 'boot_$modulename' symbol on use
by PodMaster (Abbot) on Aug 12, 2004 at 22:57 UTC | |
|