Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
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 Makefile.pl ... 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: https://github.com/downloads/taglib/taglib/taglib-1.7.2.tar.gz
And Audio::TagLib here: http://search.cpan.org/CPAN/authors/id/G/GL/GLEACH/Audio-TagLib-1.61.tar.gz

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

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
Edit Makefile.pl
All the "taglib-config" stuff has got to go ... Replicate with hard coded values.
See my Makefile.pl included at the end.
Edit TagLib.xs
Add the following two lines right after #include "ppport.h"

#undef PerlLIO_read #undef PerlLIO_write
Run:
perl Makefile.pl dmake dmake install

My Makefile.pl

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/TagLib.pm', 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/TagLib.pm', AUTHOR => 'Geoffrey Leach <gleach@cpan.org>' ) : () ), 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.

-Enjoy
fh :)_~


In reply to Re: Audio::TagLib and Strawberry Perl by Anonymous Monk
in thread Audio::TagLib and Strawberry Perl by Anonymous Monk

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!
  • 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, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            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.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others romping around the Monastery: (10)
    As of 2014-07-30 07:19 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      My favorite superfluous repetitious redundant duplicative phrase is:









      Results (229 votes), past polls