----- Original Message ----- From: "Sisyphus" <[EMAIL PROTECTED]>
.
.
---------------------------------------------
package MIME::KDE;
use warnings;

use Inline CPP => <<'EOC';

#include <iostream>

namespace MIME {
   namespace KDE {
       const char* version(void) {
           return "my version is 0.01";
       }
   }
}
EOC

$z = MIME::KDE::version();
print $z, "\n";
----------------------------------------

Been playing around a bit ...

Is the 'namespace' stuff needed ? It poses problems with InlineX::CPP2XS, too.

However, both Inline::CPP and InlineX::CPP2XS have no problem with the following form of the version() function:

---------------------------
package MIME::KDE;
use warnings;

use Inline CPP => Config =>
   BUILD_NOISY => 1;

use Inline CPP => <<'EOC';

#include <iostream>

char* version() {
     return "my version is 0.01";
       }

EOC

$z = MIME::KDE::version();
print $z, "\n";
--------------------------

Does removal of the 'namespace' stuff lead to loss of functionality somewhere along the way ?

Cheers,
Rob

Reply via email to