Hi Rob, You are most helpfull and I really appreciate your help. I did as you said : 1. I "make clean" to erase all the compiled objects. 2. I added your BUILD_NOISY flag. 3. I addid a -L directive to the loaction of that lib in a different style (all the directive together seems to work better than separately - I don't know why):
use Inline (CPP => 'DATA', LIBS => '-L/users/nirf/perlTrials/cNewModule/lib -lmai +n -L/usr/lib -lstdc++', INC => '-I/users/nirf/perlTrials/inlineExample', WARNINGS => 0, NAME => 'PM_wed', VERSION => '0.01', BUILD_NOISY => 1, );
4.I tried to remove the warnings regarding iostream.h by adding to the parameters the line " ENABLE => STD_IOSTREAM," :
use Inline (CPP => 'DATA', LIBS => '-L/users/nirf/perlTrials/cNewModule/lib -lmai +n -L/usr/lib -lstdc++', INC => '-I/users/nirf/perlTrials/inlineExample', WARNINGS => 0, NAME => 'PM_wed', VERSION => '0.01', BUILD_NOISY => 1, ENABLE => STD_IOSTREAM, );
but it didn't work. do you know why? 5.The new error I get now is as follows. It doesn't find that library (although it says so only in the test phase):
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_h +arness(0, 'blib/lib', 'blib/arch')" t/*.t t/1....ok 1/1Had problems bootstrapping Inline module 'PM_wed' Can't load '/users/nirf/perlTrials/PM_wed/blib/arch/auto/PM_wed/PM_wed +.so' for module PM_wed: libmain.so: cannot open shared object file: N +o such file or directory at /usr/lib/perl5/5.8.5/i386-linux-thread-mu +lti/DynaLoader.pm line 230, <DATA> line 1. at /usr/lib/perl5/vendor_perl/5.8.5/Inline.pm line 500 at t/1.t line 0 INIT failed--call queue aborted, <DATA> line 1. # Looks like your test died just after 1. t/1....dubious Test returned status 255 (wstat 65280, 0xff00) after all the subtests completed successfully Failed Test Stat Wstat Total Fail Failed List of Failed ---------------------------------------------------------------------- +--------- t/1.t 255 65280 1 0 0.00% ?? Failed 1/1 test scripts, 0.00% okay. 0/1 subtests failed, 100.00% okay +. make: *** [test_dynamic] Error 2
By the way,the messages I get in the "make" phase seems ok (there is no indication to the error that follows at the next "test" phase) :
cp PM_wed.pm blib/lib/PM_wed.pm /usr/bin/perl -Mblib -MInline=NOISY,_INSTALL_ -MPM_wed -e1 0.01 blib/a +rch Starting Build Prepocess Stage Finished Build Prepocess Stage Starting Build Parse Stage Finished Build Parse Stage Starting Build Glue 1 Stage Finished Build Glue 1 Stage Starting Build Glue 2 Stage Finished Build Glue 2 Stage Starting Build Glue 3 Stage Finished Build Glue 3 Stage Starting Build Compile Stage Starting "perl Makefile.PL" Stage WARNING: CC is not a known parameter. Writing Makefile for PM_wed Finished "perl Makefile.PL" Stage Starting "make" Stage make[1]: Entering directory `/users/nirf/perlTrials/PM_wed/_Inline/bui +ld/PM_wed' /usr/bin/perl /usr/lib/perl5/5.8.0/ExtUtils/xsubpp -typemap /usr/lib/ +perl5/5.8.0/ExtUtils/typemap PM_wed.xs > PM_wed.xsc && mv PM_wed.xs +c PM_wed.c g++ -c -I/users/nirf/perlTrials/PM_wed -I/users/nirf/perlTrials/inlin +eExample -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING - +fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_ +OFFSET_BITS=64 -I/usr/include/gdbm -O2 -march=i386 -mcpu=i686 -g -D +VERSION=\"0.01\" -DXS_VERSION=\"0.01\" -fPIC "-I/usr/lib/perl5/5.8.0/ +i386-linux-thread-multi/CORE" PM_wed.c In file included from /usr/include/c++/3.2.2/backward/iostream.h:31, from PM_wed.xs:2: /usr/include/c++/3.2.2/backward/backward_warning.h:32:2: warning: #war +ning This file includes at least one deprecated or antiquated header. + Please consider using one of the 32 headers found in section 17.4.1. +2 of the C++ standard. Examples include substituting the <X> header f +or the <X.h> header for C++ includes, or <sstream> instead of the dep +recated header <strstream.h>. To disable this warning use -Wno-deprec +ated. Running Mkbootstrap for PM_wed () chmod 644 PM_wed.bs rm -f blib/arch/auto/PM_wed/PM_wed.so LD_RUN_PATH="/usr/lib:/users/nirf/perlTrials/cNewModule/lib" gcc -sha +red -L/usr/local/lib PM_wed.o -o blib/arch/auto/PM_wed/PM_wed.so - +lstdc++ -L/users/nirf/perlTrials/cNewModule/lib -lmain -L/usr/lib -ls +tdc++ chmod 755 blib/arch/auto/PM_wed/PM_wed.so cp PM_wed.bs blib/arch/auto/PM_wed/PM_wed.bs chmod 644 blib/arch/auto/PM_wed/PM_wed.bs make[1]: Leaving directory `/users/nirf/perlTrials/PM_wed/_Inline/buil +d/PM_wed' Finished "make" Stage Starting "make install" Stage make[1]: Entering directory `/users/nirf/perlTrials/PM_wed/_Inline/bui +ld/PM_wed' Installing /users/nirf/perlTrials/PM_wed/blib/arch/auto/PM_wed/PM_wed. +so Installing /users/nirf/perlTrials/PM_wed/blib/arch/auto/PM_wed/PM_wed. +bs Files found in blib/arch: installing files in blib/lib into architectu +re dependent library tree Writing /users/nirf/perlTrials/PM_wed/blib/arch/auto/PM_wed/.packlist make[1]: Leaving directory `/users/nirf/perlTrials/PM_wed/_Inline/buil +d/PM_wed' Finished "make install" Stage Starting Cleaning Up Stage Finished Cleaning Up Stage Finished Build Compile Stage
Thanks, Nir

In reply to Re^2: Inline CPP by nirf1
in thread Inline CPP by nirf1

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.