libmyclass builds successfully, and the test I created for it works fine. I added the myclass/myclass.h/.cpp and the Makefile.PL to the manifest. Added '-L/home/dr/Abby/XS/Mytest/myclass' to LIBS. myclass/libmyclass gets mentions in the Makefile as MYEXTLIB. Nothing solved the problem so far. This is the output of the make-command:
Skip blib/lib/Mytest.pm (unchanged) cd myclass && make make[1]: Betrete Verzeichnis '/home/dr/Abby/XS/Mytest/myclass' g++ -c -fPIC -O2 -g -DVERSION=\"\" -DXS_VERSION=\"\" -fPIC "-I/usr +/lib/perl/5.14/CORE" myclass.cpp ar cr libmyclass.a myclass.o unitTest.o : libmyclass.a make[1]: Verlasse Verzeichnis '/home/dr/Abby/XS/Mytest/myclass' make[1]: Betrete Verzeichnis '/home/dr/Abby/XS/Mytest/myclass' make[1]: Für das Ziel »all« ist nichts zu tun. make[1]: Verlasse Verzeichnis '/home/dr/Abby/XS/Mytest/myclass' g++ -c -I. -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing - +pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FI +LE_OFFSET_BITS=64 -O2 -g -DVERSION=\"0.01\" -DXS_VERSION=\"0.01\" - +fPIC "-I/usr/lib/perl/5.14/CORE" Mytest.c Running Mkbootstrap for Mytest () chmod 644 Mytest.bs rm -f blib/arch/auto/Mytest/Mytest.so g++ -shared -O2 -g -L/usr/local/lib -fstack-protector Mytest.o -o bl +ib/arch/auto/Mytest/Mytest.so myclass/libmyclass.a \ \ chmod 755 blib/arch/auto/Mytest/Mytest.so cp Mytest.bs blib/arch/auto/Mytest/Mytest.bs chmod 644 blib/arch/auto/Mytest/Mytest.bs Manifying blib/man3/Mytest.3pm
and this for make test
make[1]: Betrete Verzeichnis '/home/dr/Abby/XS/Mytest/myclass' make[1]: Für das Ziel »all« ist nichts zu tun. make[1]: Verlasse Verzeichnis '/home/dr/Abby/XS/Mytest/myclass' PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_h +arness(0, 'blib/lib', 'blib/arch')" t/*.t t/Mytest.t .. 1/2 # Failed test 'use Mytest;' # at t/Mytest.t line 12. # Tried to use 'Mytest'. # Error: Can't load '/home/dr/Abby/XS/Mytest/blib/arch/auto/Mytes +t/Mytest.so' for module Mytest: /home/dr/Abby/XS/Mytest/blib/arch/aut +o/Mytest/Mytest.so: undefined symbol: _ZN7MyClassD1Ev at /usr/lib/per +l/5.14/DynaLoader.pm line 184. # at (eval 4) line 2 # Compilation failed in require at (eval 4) line 2. # BEGIN failed--compilation aborted at (eval 4) line 2. Can't locate object method "new" via package "Mytest" at t/Mytest.t li +ne 14. # Looks like you planned 2 tests but ran 1. # Looks like you failed 1 test of 1 run. # Looks like your test exited with 255 just after 1. t/Mytest.t .. Dubious, test returned 255 (wstat 65280, 0xff00) Failed 2/2 subtests Test Summary Report ------------------- t/Mytest.t (Wstat: 65280 Tests: 1 Failed: 1) Failed test: 1 Non-zero exit status: 255 Parse errors: Bad plan. You planned 2 tests but ran 1. Files=1, Tests=1, 0 wallclock secs ( 0.03 usr 0.00 sys + 0.03 cusr + 0.00 csys = 0.06 CPU) Result: FAIL Failed 1/1 test programs. 1/1 subtests failed. make: *** [test_dynamic] Fehler 255

In reply to Re^2: Unable to use created PerlXS Modul ( using c++ ) by lamchob
in thread Unable to use created PerlXS Modul ( using c++ ) by lamchob

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.