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!!