Hey folks... I've tried building this module with h2xs | (swig & (MakeMaker | ModuleBuild)). It builds and is installed fine, but when i go to use it in a test script, i get this error message:
Can't find 'boot_MappedMaps' symbol in /.../MappedMaps.so at /.../MappedMaps.pm line 7 Compilation failed in require at testMappedMaps.pl line 7. BEGIN failed--compilation aborted at testMappedMaps.pl line 7.
Here's the MakeMaker Makefile.PL:
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 );
Also, here's the swig cmd-line and the h2xs cmd-line:
#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
I understand DynaLoader (i've got the latest & greatest) is responsible for the bootstrapping, so what's going wrong here? How can I correct it? I'd be happy to provide more details if needed...much thanks in advance!

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:
#define SWIG_init boot_MappedMaps
then, the definition for SWIG_init is:
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); }
still have the question, "why can't DynaLoader find boot_MappedMaps?" anybody?

In reply to module builds but can't find 'boot_$modulename' symbol on use by Ebola_Influenza

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.