Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re: Audio::TagLib and Strawberry Perl

by Anonymous Monk
on Aug 22, 2012 at 23:09 UTC ( #989165=note: print w/replies, xml ) Need Help??

in reply to Audio::TagLib and Strawberry Perl

Yipee! It compiles to completion ... though broken to get there . :(

Hopefully I have done the foot work and narrowed it down for a C++ guru to be able to resolve this in minutes! (or less)
The issue revolves around iostream (I think they are the overloaded iostream operators)??

Short Version.
With the following changes one can get Audio::TagLib to compile and install ... However it will not return data.

After Taglib is installed, edit the following three files.

tbytevector.h tstringlist.h tstring.h
Commenting out the
#include <iostream>

Then editing Audio::TagLib/TagLib.xs and adding the following two lines just after #include "ppport.h"

#undef PerlLIO_read #undef PerlLIO_write

And last but not least modifying ... I'll just give mine as an example, It's hacked it so please don't chew me up to small! (Included at end)

Long version and Installation details. (It's quick and easy)
Installing Audio::TagLib on Windows XP SP3 with Strawberry Perl v5.16.1.1.
I'll assume Strawberry Perl (or your Win32 Perl Pref) and CMake is already installed.

Taglib-1.7.2 can be found here:
And Audio::TagLib here:

Change directory to where you expanded Taglib. (C:\Libraries\Taglib-1.7.2)

cmake -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=C:/Libraries/TagLib +-DCMAKE_RELEASE_TYPE=Release . gmake gmake install

Taglib is now installed!
Following my examples Taglib will be installed to: C:\Libraries\Taglib

At this time Audio::Taglib will not compile do to issues with iostream and the overloaded operators (I think thats what they are), I am NO C++ guru, I do not understand them, Hopefully I have done the foot work for a C++ guru to be able to resolve this in minutes! (or less)

So to get it to compile you need to edit the following three Taglib header files (C:\Libraries\Taglib\Include\Taglib\):

tbytevector.h tstringlist.h tstring.h

Comment out the: #include <iostream>

Expand Audio::TagLib to: C:\Strawberry\cpan\build\Audio-TagLib-1.61
CD to: C:\Strawberry\cpan\build\Audio-TagLib-1.61
All the "taglib-config" stuff has got to go ... Replicate with hard coded values.
See my included at the end.
Edit TagLib.xs
Add the following two lines right after #include "ppport.h"

#undef PerlLIO_read #undef PerlLIO_write
perl dmake dmake install


use 5.008001; use ExtUtils::MakeMaker; use Config; my $libdir = 'C:/Libraries/taglib/lib'; my $includedir = 'C:/Libraries/taglib/include'; my $libver = '1.7.2'; my $CC = 'g++'; my $libs = ' -L' . $libdir . ' -llibtag.dll'; #my $cflags = '$Config{'ccflags'}; my $cflags = $Config{'ccflags'}; my $inc = '-I' . $Config{'incpath'} . ' -I./include' . ' -I' . + $includedir . '/taglib'; my $ldd = $Config{'lddlflags'} . ' ' . $Config{'ccdlflags'} . + ' ' . $Config{'cccdlflags'}; # Configure various os-es my $define; if ( $Config{'osname'} eq 'darwin' ) { $define = '-D_BSD_ICONV -DNO_DOXYGEN'; $libs .= ' -L/System/Library/Perl/lib/'. $Config{version}. ' -lper +l -liconv'; } elsif ( $Config{'osname'} eq 'freebsd' ) { $define = '-D_BSD_ICONV -DNO_DOXYGEN'; $libs .= ' -liconv'; } elsif ( $Config{'osname'} eq 'MSWin32' ) { # $define = '-D_BSD_ICONV -DNO_DOXYGEN'; # $define = '-DNO_DOXYGEN'; $libs .= ' -liconv'; } #$Verbose = 2; WriteMakefile( NAME => 'Audio::TagLib', MIN_PERL_VERSION => '5.008001', VERSION_FROM => 'lib/Audio/', LICENSE => 'perl', CC => $CC, LD => '$(CC)', XSOPT => '-C++ -hiertype', CCFLAGS => $cflags, LIBS => $libs, DEFINE => $define, INC => $inc, LDDLFLAGS => $ldd, ( $Config{'version'} >= 5.005 ? ( ABSTRACT_FROM => 'lib/Audio/', AUTHOR => 'Geoffrey Leach <>' ) : () ), PREREQ_PM => { "Encode" => 0, "Test::Deep" => 0, "File::Slurp" => 0, "Test::More" => 0, "Test::Output" => 0, }, "CONFIGURE_REQUIRES" => { "ExtUtils::MakeMaker" => 0, "Config" => 0, }, );

Hopefully this will encourage a C++ guru to look into this now that It's been narrowed down.

It's gotta be something stupid simple.

fh :)_~

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://989165]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2018-05-26 10:54 GMT
Find Nodes?
    Voting Booth?