----- Original Message -----
From: "Erik Hollensbe" <[EMAIL PROTECTED]>
.
.
package MIME::KDE;
use warnings;
use strict;
use version qw(qv);
our $VERSION = qv('0.01');
our $CODE = "";
use File::Basename qw(dirname);
BEGIN {
open(CPP, dirname(__FILE__).'/src/mimelib.cpp')
|| die "Couldn't locate C++ stub: $!";
local $/ = undef;
$CODE = <CPP>;
close(CPP);
print STDERR "$CODE\n";
};
use Inline CPP =>
Config =>
LIBS => ['-lkio', '-lkdecore'],
INC =>
['-I /usr/include/kde', '-I /usr/include/qt3'],
ENABLE => 'STD_IOSTREAM'
;
use Inline CPP => "$CODE";
That, too, works fine for me with my modified "mimelib.cpp" - which looks
like this:
-------------------------------
#include <iostream>
//namespace MIME {
// namespace KDE {
char* version() {
return "my version is 0.01";
}
// }
//}
-------------------------------
The only changes I made to your script was to remove the
-------------------------------
LIBS => ['-lkio', '-lkdecore'],
INC =>
['-I /usr/include/kde', '-I /usr/include/qt3'],
-------------------------------
(for obvious reasons) and to add, at the bottom of the script:
-------------------------------
my $z = MIME::KDE::version();
print $z;
-------------------------------
It then output:
-------------------------------
C:\_32\pscrpt\inline>perl try.pl
#include <iostream>
//namespace MIME {
// namespace KDE {
char* version() {
return "my version is 0.01";
}
// }
//}
my version is 0.01
-------------------------------
That looks about right to me.
There's nothing wrong with you're use of INC and LIBS ... not sure where to
head from here.
Actually, *I* have to head for bed.
I'll return in a few hours (probably about 10) and pick this up again ... if
you haven't got it sorted by then, that is :-)
Cheers,
Rob