in reply to Re^4: Including existing C or CPP library using Inline
in thread Including existing C or CPP library using Inline
That's how you've passed the strings to do_SSW() - the problem with do_SSW() is that you've specified a *return* of type "string".int cprintit(const char * seq) { cout << seq << endl; return 10; }
where 'C:/_32/pscrpt/inline-cpp/stringtype.map' contains the following single line (plus newline):#!/usr/bin/perl use warnings; use Inline CPP => Config => BUILD_NOISY => 1, TYPEMAPS => 'C:/_32/pscrpt/inline-cpp/stringtype.map', CLEAN_AFTER_BUILD => 0; use Inline CPP; my $seq = "CTGAGCCGGTAAATC"; my $returned = cprintit($seq); print $returned."\n"; __END__ __CPP__ using namespace std; int cprintit(string seq) { cout << seq << endl; return 10; }
(Safest to provide a fully qualified path to the typemap file - though a path relative to the cwd should also work.)string T_PV
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Including existing C or CPP library using Inline
by bontus (Novice) on Mar 23, 2014 at 14:49 UTC | |
by davido (Cardinal) on Mar 23, 2014 at 17:05 UTC |