I'm writing a module with XS and C++. After tried XSPP, I found it lack some important functions such as "PPCODE", so I decided to write XS code by my hand.

Though that, the Module::Build::WithXSpp is still very handful, as it automatically find and set C++ flags to compilers, and it calls TypeMap modules automatically. However, when I masked my .xsp files and set up my .xs files, the builder failed to build them into a single .so file. Instead, it compiles the code generated from my .xs files into blib/arch/auto/xs/XXX, and the code automatically generated by M::B::WithXSpp into blib/arch/auto/XXX.

...... cc -shared -L/usr/local/lib -fstack-protector -o blib/arch/auto/xs/Gen +oEye_Page/GenoEye_Page.so xs/GenoEye_Page.o -lcairo -lstdc++ -lGenoEy +e -lboost_regex ...... cc -shared -L/usr/local/lib -fstack-protector -o blib/arch/auto/GenoEy +e/GenoEye.so buildtmp/GenoEye.o -lcairo -lstdc++ -lGenoEye -lboost_re +gex

As a result, the generated .so file under the correct location is a null one. how could this happen?

This is the layout of my project:
Build Build.PL Changes ignore.txt MANIFEST MANIFEST.skip MYMETA.json MYMETA.yml README lib: GenoEye.pm src: ppport.h t: 00-load.t 01-page.t boilerplate.t manifest.t pod-coverage.t pod.t xs: GenoEye_Page.c GenoEye_Page.o GenoEye_Page.xs typemap.map
Thanks!!

In reply to Module::Build::WithXSpp does not correctly handle XS files correctly? by llancet

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.