Błędy kompilacji programu (dev c++) (odczyt tagów MP3)


(Zimon) #1

witam

podczas kompilowania programu wyskakują mi błędy ale dotyczą one plików nagłówkowych.

Plik programu:

/* 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 


                  MP3FileInfo 1.0 

               ----------------------- 


  MP3FileInfo is a wrapper class for id3lib, a library capable 

  of reading and writing ID3 Tags of MP3 Files. It has a 

  simple interface and provides all data as public members. 


  Written by Christian Richardt (cr@whizer.net). 


  Release history: 

   Mai 31, 2003: Version 1.0. First release. 


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 




/** 

  \file MP3FileInfo.cpp 

  \brief Reads Header and ID3 Tags of MP3 Files 

  \date 2003-05-31 

  \author Christian Richardt (cr@whizer.net) 

**/ 



  #include 

  #include 

  #include 




/* ----------------------- Init and Free ------------------------ */ 



   /** 

     \brief Initialize and parse all data 


     Always Initalize this class by calling Init(). It returns 

     false if an error occured. 


     You can call Init() as often as you want. All data is being 

     freed before extracting the data of the new file. 

   **/ 

  bool MP3FileInfo::Init(const char* cszFilename) 

   { 

   Free(); 

   m_bOK = true; 


     // copy filename 

   szFilename = new char[strlen(cszFilename)+1]; 

   sprintf(szFilename, cszFilename); 


   m_id3tag = new ID3_Tag; 

   m_id3tag->Link(szFilename); 


   /* Fileinfo */ 

   bHasLyrics = m_id3tag->HasLyrics(); 

   bHasV1Tag = m_id3tag->HasV1Tag(); 

   bHasV2Tag = m_id3tag->HasV2Tag(); 

   nFileSize = (int)m_id3tag->GetFileSize(); 


   /* Headerinfo */ 

   m_parseHeader(); 

   if(!m_bOK) { Free(); return m_bOK; } 


   /* V1 up */ 

   szAlbum = m_getNewString(ID3FID_ALBUM); 

   szArtist = m_getNewString(ID3FID_LEADARTIST); 

   szComment = m_getNewString(ID3FID_COMMENT); 

   szTitle = m_getNewString(ID3FID_TITLE); 

   szTrack = m_getNewString(ID3FID_TRACKNUM); 

   szYear = m_getNewString(ID3FID_YEAR); 


   /* V2 */ 

   szComposer = m_getNewString(ID3FID_COMPOSER); 

   szCopyright = m_getNewString(ID3FID_COPYRIGHT); 

   szEncodedBy = m_getNewString(ID3FID_ENCODEDBY); 

   szOriginalArtist = m_getNewString(ID3FID_ORIGARTIST); 

   szURL = m_getNewString(ID3FID_WWWUSER); 


   m_parseGenre(); 

   if(szYear) sscanf(szYear, "%i", &nYear); 

   if(szTrack) sscanf(szTrack, "%i", &nTrack); 


   return m_bOK; 

   } 



   /** 

     \brief Free all allocated ressources 


     You can call Free() as often as you want. 

     No error is raised. 

   **/ 

  void MP3FileInfo::Free(void) 

   { 

   if(m_bOK) // only free if OK 

    { 

     m_bOK = false; 


     if(m_id3tag!=0) 

      { 

        // in rare cases (e.g. if file is corrupt) 

        // "delete m_id3tag" fails ... 

      try { delete m_id3tag; } catch(...) {} 

      m_id3tag = 0; 

      } 


     /* fileinfo */ 

     delete[] szFilename; szFilename = 0; nFileSize = -1; 

     bHasLyrics = false; bHasV1Tag = false; bHasV2Tag = false; 


     /* headerinfo */ 

     m_mp3header = 0; 

     nVbrBitRate = 0; nBitRate = 0; nCbrBitRate = 0; 

     nSampleRate = 0; nLength = 0; 

     delete[] szBitRate; szBitRate = 0; 

     delete[] szMpegLayer; szMpegLayer = 0; 

     delete[] szMpegVersion; szMpegVersion = 0; 

     delete[] szChannelMode; szChannelMode = 0; 


     /* ID3V1 Tag elements */ 

     nTrack = 0; nYear = 0; 

     delete[] szArtist; szArtist = 0; 

     delete[] szTitle; szTitle = 0; 

     delete[] szAlbum; szAlbum = 0; 

     delete[] szComment; szComment = 0; 

     delete[] szTrack; szTrack = 0; 

     delete[] szYear; szYear = 0; 

     delete[] szGenre; szGenre = 0; 


     /* V2 up */ 

     delete[] szComposer; szComposer= 0; 

     delete[] szCopyright; szCopyright= 0; 

     delete[] szEncodedBy; szEncodedBy= 0; 

     delete[] szOriginalArtist; szOriginalArtist= 0; 

     delete[] szURL; szURL= 0; 

    } 

   } 



/* ---------------- public member functions ---------------- */ 



   /// prints all frames the file contains 

  void MP3FileInfo::ShowAllFrames(void) 

   { 

   assert(m_bOK); 


     // all FrameIDs 

   ID3_FrameID fids[] = { ID3FID_NOFRAME, ID3FID_AUDIOCRYPTO, ID3FID_PICTURE, ID3FID_AUDIOSEEKPOINT, ID3FID_COMMENT, 

                     ID3FID_COMMERCIAL, ID3FID_CRYPTOREG, ID3FID_EQUALIZATION2, ID3FID_EQUALIZATION, ID3FID_EVENTTIMING, 

                     ID3FID_GENERALOBJECT, ID3FID_GROUPINGREG, ID3FID_INVOLVEDPEOPLE, ID3FID_LINKEDINFO, ID3FID_CDID, 

                     ID3FID_MPEGLOOKUP, ID3FID_OWNERSHIP, ID3FID_PRIVATE, ID3FID_PLAYCOUNTER, ID3FID_POPULARIMETER, 

                     ID3FID_POSITIONSYNC, ID3FID_BUFFERSIZE, ID3FID_VOLUMEADJ2, ID3FID_VOLUMEADJ, ID3FID_REVERB, 

                     ID3FID_SEEKFRAME, ID3FID_SIGNATURE, ID3FID_SYNCEDLYRICS, ID3FID_SYNCEDTEMPO, ID3FID_ALBUM, 

                     ID3FID_BPM, ID3FID_COMPOSER, ID3FID_CONTENTTYPE, ID3FID_COPYRIGHT, ID3FID_DATE, 

                     ID3FID_ENCODINGTIME, ID3FID_PLAYLISTDELAY, ID3FID_ORIGRELEASETIME, ID3FID_RECORDINGTIME, ID3FID_RELEASETIME, 

                     ID3FID_TAGGINGTIME, ID3FID_INVOLVEDPEOPLE2, ID3FID_ENCODEDBY, ID3FID_LYRICIST, ID3FID_FILETYPE, 

                     ID3FID_TIME, ID3FID_CONTENTGROUP, ID3FID_TITLE, ID3FID_SUBTITLE, ID3FID_INITIALKEY, 

                     ID3FID_LANGUAGE, ID3FID_SONGLEN, ID3FID_MUSICIANCREDITLIST, ID3FID_MEDIATYPE, ID3FID_MOOD, 

                     ID3FID_ORIGALBUM, ID3FID_ORIGFILENAME, ID3FID_ORIGLYRICIST, ID3FID_ORIGARTIST, ID3FID_ORIGYEAR, 

                     ID3FID_FILEOWNER, ID3FID_LEADARTIST, ID3FID_BAND, ID3FID_CONDUCTOR, ID3FID_MIXARTIST, 

                     ID3FID_PARTINSET, ID3FID_PRODUCEDNOTICE, ID3FID_PUBLISHER, ID3FID_TRACKNUM, ID3FID_RECORDINGDATES, 

                     ID3FID_NETRADIOSTATION, ID3FID_NETRADIOOWNER, ID3FID_SIZE, ID3FID_ALBUMSORTORDER, ID3FID_PERFORMERSORTORDER, 

                     ID3FID_TITLESORTORDER, ID3FID_ISRC, ID3FID_ENCODERSETTINGS, ID3FID_SETSUBTITLE, ID3FID_USERTEXT, 

                     ID3FID_YEAR, ID3FID_UNIQUEFILEID, ID3FID_TERMSOFUSE, ID3FID_UNSYNCEDLYRICS, ID3FID_WWWCOMMERCIALINFO, 

                     ID3FID_WWWCOPYRIGHT, ID3FID_WWWAUDIOFILE, ID3FID_WWWARTIST, ID3FID_WWWAUDIOSOURCE, ID3FID_WWWRADIOPAGE, 

                     ID3FID_WWWPAYMENT, ID3FID_WWWPUBLISHER, ID3FID_WWWUSER, ID3FID_METACRYPTO, ID3FID_METACOMPRESSION, 

                     ID3FID_LASTFRAMEID 

                   }; 


     // a frame usually contains one field of the following fields: 

   ID3_FieldID fiids[] = { ID3FN_NOFIELD, ID3FN_TEXTENC, ID3FN_TEXT, ID3FN_URL, ID3FN_DATA, ID3FN_DESCRIPTION, ID3FN_OWNER, ID3FN_EMAIL, ID3FN_RATING, ID3FN_FILENAME, ID3FN_LANGUAGE, ID3FN_PICTURETYPE, ID3FN_IMAGEFORMAT, ID3FN_MIMETYPE, ID3FN_COUNTER, ID3FN_ID, ID3FN_VOLUMEADJ, ID3FN_NUMBITS, ID3FN_VOLCHGRIGHT, ID3FN_VOLCHGLEFT, ID3FN_PEAKVOLRIGHT, ID3FN_PEAKVOLLEFT, ID3FN_TIMESTAMPFORMAT, ID3FN_CONTENTTYPE, ID3FN_LASTFIELDID}; 

   char* idesc[] = { "No field.", "Text encoding (unicode or ASCII).", "Text field.", "A URL.", "Data field.", "Description field.", "Owner field.", "Email field.", "Rating field.", "Filename field.", "Language field.", "Picture type field.", "Image format field.", "Mimetype field.", "Counter field.", "Identifier/Symbol field.", "Volume adjustment field.", "Number of bits field.", "Volume chage on the right channel.", "Volume chage on the left channel.", "Peak volume on the right channel.", "Peak volume on the left channel.", "SYLT Timestamp Format.", "SYLT content type.", "Last field placeholder."}; 



   int i=0; 

   char* buf = 0; 

   ID3_Frame* frame = 0; 

   ID3_Field* field = 0; 

   while(i<96) 

    { 

     if(i==2 || i==10) // picture and encapsulated object often fail 

      { 

      printf("%2i. Skipping\n", i); 

      i++; continue; 

      } 


     try { frame = m_id3tag->Find(fids[i]); } 

     catch(...) 

      { 

      printf("ERROR: SKIPPING FILE (i=%i)\n", i); 

      Free(); 

      return; 

      } 


     if(frame==0) { i++; continue; } // Frame not found 

     printf("%2i. %-35s : ", i, frame->GetDescription()); 


     buf = m_getNewString(fids[i]); 

     if(buf) 

      { 

      printf("\"%s\"\n", buf); 

      delete[] buf; 

      frame = 0; 

      i++; continue; 

      } 


     printf("No Text found, but:\n", buf); 


     for(int k=1; k<24; k++) 

      { 

      try 

       { 

        if(frame->Contains(fiids[k])) 

         { printf("%-43s- %s\n", "", idesc[k]); } 

       } 

      catch(...) 

       { 

        printf("%-42sERROR: SKIPPING FILE (i=%i; k=%i)\n", "", i, k); 

        Free(); 

        return; 

       } 

      } 

     printf("\n"); 

     frame = 0; 

     i++; continue; 

    } 

   printf("\n"); 

   } 




/* ---------------- protected member functions ---------------- */ 


   /** 

     \brief parses the genre of the file 


     In ID3V1 Tags, the genre is a simple byte and needs to be 

     converted to a string first, but ID3V2 allows arbitrary 

     genre descriptions. 

   **/ 

  void MP3FileInfo::m_parseGenre(void) 

   { 

   if(bHasV2Tag) // Use V2 if present 

    { 

     szGenre = m_getNewString(ID3FID_CONTENTTYPE); 

     return; 

    } 


   char buf[10]; 

   if(!m_getString(ID3FID_CONTENTTYPE, buf)) 

    { 

     szGenre = 0; 

     return; 

    } 


   int gid; 

   sscanf(buf, "(%i)", &gid); // filter Genre ID 


   if(gid >= ID3_NR_OF_V1_GENRES) // genre ID too large 

    { 

     szGenre = new char[strlen(buf)+1]; 

     sprintf(szGenre, buf); 

     return; 

    } 


   szGenre = new char[strlen(ID3_V1GENRE2DESCRIPTION(gid))+1]; 

   sprintf(szGenre, ID3_V1GENRE2DESCRIPTION(gid)); 

   } 


   /// parses header infomation 

  void MP3FileInfo::m_parseHeader(void) 

   { 

   assert(m_bOK); 


   m_mp3header = m_id3tag->GetMp3HeaderInfo(); 

   if(!m_mp3header) 

    { 

     //printf("\n[Error]:\nGetMp3HeaderInfo() failed!\n(file: %s)\n\n", szFilename); 

     Free(); 

     return; 

    } 


   nCbrBitRate = m_mp3header->bitrate; 

   nVbrBitRate = m_mp3header->vbr_bitrate; 

   nSampleRate = m_mp3header->frequency; 

   nLength = m_mp3header->time; 


   szBitRate = new char[20]; 

   if(nVbrBitRate>0) 

    { 

     sprintf(szBitRate, "%i kbit/s (VBR)", nVbrBitRate/1000); 

     nBitRate = nVbrBitRate; 

    } 

   else 

    { 

     sprintf(szBitRate, "%i kbit/s", nCbrBitRate/1000); 

     nBitRate = nCbrBitRate; 

    } 



     // MPEG Layer 

   szMpegLayer = new char[10]; 

   switch(m_mp3header->layer) 

    { 

     case MPEGLAYER_UNDEFINED: sprintf(szMpegLayer, "UNDEFINED"); break; 

     case MPEGLAYER_III: sprintf(szMpegLayer, "Layer III"); break; 

     case MPEGLAYER_II: sprintf(szMpegLayer, "Layer II"); break; 

     case MPEGLAYER_I: sprintf(szMpegLayer, "Layer I"); break; 

     default: szMpegLayer = 0; 

    } 


     // MPEG Version 

   szMpegVersion = new char[10]; 

   switch(m_mp3header->version) 

    { 

     case MPEGVERSION_2_5: sprintf(szMpegVersion, "MPEG 2.5"); break; 

     case MPEGVERSION_2: sprintf(szMpegVersion, "MPEG 2"); break; 

     case MPEGVERSION_1: sprintf(szMpegVersion, "MPEG 1"); break; 

     default: szMpegVersion = 0; 

    } 


     // Channel Mode 

   szChannelMode = new char[15]; 

   switch(m_mp3header->channelmode) 

    { 

     case MP3CHANNELMODE_STEREO: sprintf(szChannelMode, "Stereo"); break; 

     case MP3CHANNELMODE_JOINT_STEREO: sprintf(szChannelMode, "Joint Stereo"); break; 

     case MP3CHANNELMODE_DUAL_CHANNEL: sprintf(szChannelMode, "Dual Channel"); break; 

     case MP3CHANNELMODE_SINGLE_CHANNEL: sprintf(szChannelMode, "Single Channel"); break; 

     default: szChannelMode = 0; 

    } 

   } 



   /// extracts a string 

  bool MP3FileInfo::m_getString(ID3_FrameID fid, char* szBuffer) 

   { 

   assert(m_bOK); 


   ID3_Frame* frame = m_id3tag->Find(fid); // frame 

   if(frame==0) 

    { 

     sprintf(szBuffer, "[Not Found]"); 

     return false; 

    } 


   if(!frame->Contains(ID3FN_TEXTENC)) 

    { 

     sprintf(szBuffer, "[Contains No Text]"); 

     return false; 

    } 


   ID3_Field* field = 0; 

   if(frame->Contains(ID3FN_TEXT)) 

    { field = frame->GetField(ID3FN_TEXT); } 


     // String is an URL 

   if(frame->Contains(ID3FN_URL) && (field==0)) 

    { field = frame->GetField(ID3FN_URL); } 


   if(field==0) 

    { 

     delete frame; 

     sprintf(szBuffer, "[Error]"); 

     return false; 

    } 


   field->SetEncoding(ID3TE_ISO8859_1); 

   const char* res = field->GetRawText(); // GetRawUnicodeText 

   if(res==0) 

    { 

     delete frame; 

     sprintf(szBuffer, "[Empty]"); 

     return false; 

    } 


   sprintf(szBuffer, res); 

   return true; 

   } 



   /// extracts a string 

  char* MP3FileInfo::m_getNewString(ID3_FrameID fid) 

   { 

   assert(m_bOK); 


   ID3_Frame* frame = m_id3tag->Find(fid); // find frame 

   if(frame==0) { return 0; } 


   if(!frame->Contains(ID3FN_TEXTENC)) 

    { delete frame; return 0; } // frame contains no text 


     // look for field type 

   ID3_Field* field = 0; 

   if(frame->Contains(ID3FN_TEXT)) // Text field 

    { field = frame->GetField(ID3FN_TEXT); } 


   if(frame->Contains(ID3FN_URL) && (field==0)) // URL field 

    { field = frame->GetField(ID3FN_URL); } 


   if(field==0) { delete frame; return 0; } // no field found 


   field->SetEncoding(ID3TE_ISO8859_1); // use Latin-1 charset 


   const char* res = field->GetRawText(); // TODO: GetRawUnicodeText 

   char* buf = new char[strlen(res)+1]; // new string 

   sprintf(buf, res); // copy 


   return buf; 

   }

pliki nagłówkowe w których występują błędy plik utils.h

// -*- C++ -*- 

// $Id: utils.h,v 1.22 2002/07/02 22:11:03 t1mpy Exp $ 


// id3lib: a C++ library for creating and manipulating id3v1/v2 tags 

// Copyright 1999, 2000 Scott Thomas Haug 


// This library is free software; you can redistribute it and/or modify it 

// under the terms of the GNU Library General Public License as published by 

// the Free Software Foundation; either version 2 of the License, or (at your 

// option) any later version. 

// 

// This library is distributed in the hope that it will be useful, but WITHOUT 

// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 

// FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public 

// License for more details. 

// 

// You should have received a copy of the GNU Library General Public License 

// along with this library; if not, write to the Free Software Foundation, 

// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 


// The id3lib authors encourage improvements and optimisations to be sent to 

// the id3lib coordinator. Please see the README file for details on where to 

// send such submissions. See the AUTHORS file for a list of people who have 

// contributed to id3lib. See the ChangeLog file for a list of changes to 

// id3lib. These files are distributed with id3lib at 

// http://download.sourceforge.net/id3lib/ 


#ifndef _ID3LIB_UTILS_H_ 

#define _ID3LIB_UTILS_H_ 


#if defined HAVE_CONFIG_H 

#include 

#endif 


#include "id3/id3lib_streams.h" 

#include "id3/globals.h" //has "id3/sized_types.h" 

#include "id3/id3lib_strings.h" 


namespace dami 

{ 

#ifdef MAXPATHLEN 

# define ID3_PATH_LENGTH (MAXPATHLEN + 1) 

#elif defined (PATH_MAX) 

# define ID3_PATH_LENGTH (PATH_MAX + 1) 

#else /* !MAXPATHLEN */ 

# define ID3_PATH_LENGTH (2048 + 1) 

#endif /* !MAXPATHLEN && !PATH_MAX */ 


#ifndef min 

  template

  const T& min(const T& a, const T& b) 

  { 

    return (a < b) ? a : b; 

  } 

#endif 


#ifndef max 

  template

  const T& max(const T& a, const T& b) 

  { 

    return (b < a) ? a : b; 

  } 

#endif 


#ifndef mid 

  template

  const T& mid(const T& lo, const T& mid, const T& hi) 

  { 

    return max(lo, min(mid, hi)); 

  } 

#endif 


#ifndef abs 

  template

  T abs(const T& a) 

  { 

    return (a < T(0)) ? -a : a; 

  } 

#endif 


  size_t ID3_C_EXPORT renderNumber(uchar *buffer, uint32 val, size_t size = sizeof(uint32)); 

  String ID3_C_EXPORT renderNumber(uint32 val, size_t size = sizeof(uint32)); 


  String ID3_C_EXPORT toString(uint32 val); 

  WString ID3_C_EXPORT toWString(const unicode_t[], size_t); 


  size_t ID3_C_EXPORT ucslen(const unicode_t *unicode); 

  String ID3_C_EXPORT convert(String data, ID3_TextEnc, ID3_TextEnc); 


  // file utils 

  size_t ID3_C_EXPORT getFileSize(fstream&); 

  size_t ID3_C_EXPORT getFileSize(ifstream&); 

  size_t ID3_C_EXPORT getFileSize(ofstream&); 

  ID3_Err ID3_C_EXPORT createFile(String, fstream&); 

  ID3_Err ID3_C_EXPORT openWritableFile(String, fstream&); 

  ID3_Err ID3_C_EXPORT openWritableFile(String, ofstream&); 

  ID3_Err ID3_C_EXPORT openReadableFile(String, fstream&); 

  ID3_Err ID3_C_EXPORT openReadableFile(String, ifstream&); 


}; 


#endif /* _ID3LIB_UTILS_H_ */

Plik tag.h

// -*- C++ -*- 

// $Id: tag.h,v 1.63 2003/03/02 13:35:59 t1mpy Exp $ 


// id3lib: a software library for creating and manipulating id3v1/v2 tags 

// Copyright 1999, 2000 Scott Thomas Haug 

// Copyright 2002 Thijmen Klok (thijmen@id3lib.org) 


// This library is free software; you can redistribute it and/or modify it 

// under the terms of the GNU Library General Public License as published by 

// the Free Software Foundation; either version 2 of the License, or (at your 

// option) any later version. 

// 

// This library is distributed in the hope that it will be useful, but WITHOUT 

// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 

// FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public 

// License for more details. 

// 

// You should have received a copy of the GNU Library General Public License 

// along with this library; if not, write to the Free Software Foundation, 

// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 


// The id3lib authors encourage improvements and optimisations to be sent to 

// the id3lib coordinator. Please see the README file for details on where to 

// send such submissions. See the AUTHORS file for a list of people who have 

// contributed to id3lib. See the ChangeLog file for a list of changes to 

// id3lib. These files are distributed with id3lib at 

// http://download.sourceforge.net/id3lib/ 


#ifndef _ID3LIB_TAG_H_ 

#define _ID3LIB_TAG_H_ 


#include 

#include 

#include //for ID3_PATH_LENGTH 


class ID3_Reader; 

class ID3_Writer; 

class ID3_TagImpl; 

class ID3_Tag; 


class ID3_CPP_EXPORT ID3_Tag 

{ 

  ID3_TagImpl* _impl; 

  char _tmp_filename[ID3_PATH_LENGTH]; 

public: 


  class Iterator 

  { 

  public: 

    virtual ID3_Frame* GetNext() = 0; 

  }; 


  class ConstIterator 

  { 

  public: 

    virtual const ID3_Frame* GetNext() = 0; 

  }; 


public: 


  ID3_Tag(const char *name = NULL); 

  ID3_Tag(const ID3_Tag &tag); 

  virtual ~ID3_Tag(); 


  void Clear(); 

  bool HasChanged() const; 

  size_t Size() const; 


  bool SetUnsync(bool); 

  bool SetExtendedHeader(bool); 

  bool SetExperimental(bool); 


  bool GetUnsync() const; 

  bool GetExtendedHeader() const; 

  bool GetExperimental() const; 


  bool SetPadding(bool); 


  void AddFrame(const ID3_Frame&); 

  void AddFrame(const ID3_Frame*); 

  bool AttachFrame(ID3_Frame*); 

  ID3_Frame* RemoveFrame(const ID3_Frame *); 


  size_t Parse(const uchar*, size_t); 

  bool Parse(ID3_Reader& reader); 

  size_t Render(uchar*, ID3_TagType = ID3TT_ID3V2) const; 

  size_t Render(ID3_Writer&, ID3_TagType = ID3TT_ID3V2) const; 


  size_t Link(const char *fileInfo, flags_t = (flags_t) ID3TT_ALL); 

  size_t Link(ID3_Reader &reader, flags_t = (flags_t) ID3TT_ALL); 

  flags_t Update(flags_t = (flags_t) ID3TT_ALL); 

  flags_t Strip(flags_t = (flags_t) ID3TT_ALL); 


  size_t GetPrependedBytes() const; 

  size_t GetAppendedBytes() const; 

  size_t GetFileSize() const; 

  const char* GetFileName() const; 


  ID3_Frame* Find(ID3_FrameID) const; 

  ID3_Frame* Find(ID3_FrameID, ID3_FieldID, uint32) const; 

  ID3_Frame* Find(ID3_FrameID, ID3_FieldID, const char*) const; 

  ID3_Frame* Find(ID3_FrameID, ID3_FieldID, const unicode_t*) const; 


  size_t NumFrames() const; 


  const Mp3_Headerinfo* GetMp3HeaderInfo() const; 


  Iterator* CreateIterator(); 

  ConstIterator* CreateIterator() const; 


  ID3_Tag& operator=( const ID3_Tag & ); 


  bool HasTagType(ID3_TagType tt) const; 

  ID3_V2Spec GetSpec() const; 

  bool SetSpec(ID3_V2Spec); 


  static size_t IsV2Tag(const uchar*); 

  static size_t IsV2Tag(ID3_Reader&); 


  /* Deprecated! */ 

  void AddNewFrame(ID3_Frame* f); 

  size_t Link(const char *fileInfo, bool parseID3v1, bool parseLyrics3); 

  void SetCompression(bool); 

  void AddFrames(const ID3_Frame *, size_t); 

  bool HasLyrics() const; 

  bool HasV2Tag() const; 

  bool HasV1Tag() const; 

  size_t Parse(const uchar header[ID3_TAGHEADERSIZE], const uchar *buffer); 

  //ID3_Frame* operator[](size_t) const; 

  //ID3_Frame* GetFrameNum(size_t) const; 


  ID3_Tag& operator<<(const ID3_Frame &); 

  ID3_Tag& operator<<(const ID3_Frame *); 

}; 


// deprecated! 

int32 ID3_C_EXPORT ID3_IsTagHeader(const uchar header[ID3_TAGHEADERSIZE]); 



#endif /* _ID3LIB_TAG_H_ */

komunikaty błędów:

C:/Dev-Cpp/include/id3/utils.h:81: warning: '_declspec' initialized and declared 'extern'

C:/Dev-Cpp/include/id3/utils.h:81: error: 'dllimport' was not declared in this scope

C:/Dev-Cpp/include/id3/utils.h:81: error: expected ',' or ';' before 'renderNumber'

C:/Dev-Cpp/include/id3/utils.h:82: warning: '_declspec' initialized and declared 'extern'

C:/Dev-Cpp/include/id3/utils.h:82: error: conflicting declaration 'dami::String dami::_declspec'

C:/Dev-Cpp/include/id3/utils.h:81: error: 'dami::_declspec' has a previous declaration as 'size_t dami::_declspec'

C:/Dev-Cpp/include/id3/utils.h:82: error: 'dllimport' was not declared in this scope

C:/Dev-Cpp/include/id3/utils.h:84: warning: '_declspec' initialized and declared 'extern'

C:/Dev-Cpp/include/id3/utils.h:84: error: conflicting declaration 'dami::String dami::_declspec'

C:/Dev-Cpp/include/id3/utils.h:81: error: 'dami::_declspec' has a previous declaration as 'size_t dami::_declspec'

C:/Dev-Cpp/include/id3/utils.h:84: error: 'dllimport' was not declared in this scope

C:/Dev-Cpp/include/id3/utils.h:85: warning: '_declspec' initialized and declared 'extern'

C:/Dev-Cpp/include/id3/utils.h:85: error: conflicting declaration 'dami::WString dami::_declspec'

C:/Dev-Cpp/include/id3/utils.h:81: error: 'dami::_declspec' has a previous declaration as 'size_t dami::_declspec'

C:/Dev-Cpp/include/id3/utils.h:85: error: 'dllimport' was not declared in this scope

C:/Dev-Cpp/include/id3/utils.h:87: warning: '_declspec' initialized and declared 'extern'

C:/Dev-Cpp/include/id3/utils.h:87: error: redefinition of 'size_t dami::_declspec'

C:/Dev-Cpp/include/id3/utils.h:81: error: 'size_t dami::_declspec' previously defined here

C:/Dev-Cpp/include/id3/utils.h:87: error: 'dllimport' was not declared in this scope

C:/Dev-Cpp/include/id3/utils.h:88: warning: '_declspec' initialized and declared 'extern'

C:/Dev-Cpp/include/id3/utils.h:88: error: conflicting declaration 'dami::String dami::_declspec'

C:/Dev-Cpp/include/id3/utils.h:81: error: 'dami::_declspec' has a previous declaration as 'size_t dami::_declspec'

C:/Dev-Cpp/include/id3/utils.h:88: error: 'dllimport' was not declared in this scope

C:/Dev-Cpp/include/id3/utils.h:91: warning: '_declspec' initialized and declared 'extern'

C:/Dev-Cpp/include/id3/utils.h:91: error: redefinition of 'size_t dami::_declspec'

C:/Dev-Cpp/include/id3/utils.h:81: error: 'size_t dami::_declspec' previously defined here

C:/Dev-Cpp/include/id3/utils.h:91: error: 'dllimport' was not declared in this scope

C:/Dev-Cpp/include/id3/utils.h:92: warning: '_declspec' initialized and declared 'extern'

C:/Dev-Cpp/include/id3/utils.h:92: error: redefinition of 'size_t dami::_declspec'

C:/Dev-Cpp/include/id3/utils.h:81: error: 'size_t dami::_declspec' previously defined here

C:/Dev-Cpp/include/id3/utils.h:92: error: 'dllimport' was not declared in this scope

C:/Dev-Cpp/include/id3/utils.h:93: warning: '_declspec' initialized and declared 'extern'

C:/Dev-Cpp/include/id3/utils.h:93: error: redefinition of 'size_t dami::_declspec'

C:/Dev-Cpp/include/id3/utils.h:81: error: 'size_t dami::_declspec' previously defined here

C:/Dev-Cpp/include/id3/utils.h:93: error: 'dllimport' was not declared in this scope

C:/Dev-Cpp/include/id3/utils.h:94: warning: '_declspec' initialized and declared 'extern'

C:/Dev-Cpp/include/id3/utils.h:94: error: conflicting declaration 'ID3_Err dami::_declspec'

C:/Dev-Cpp/include/id3/utils.h:81: error: 'dami::_declspec' has a previous declaration as 'size_t dami::_declspec'

C:/Dev-Cpp/include/id3/utils.h:94: error: 'dllimport' was not declared in this scope

C:/Dev-Cpp/include/id3/utils.h:95: warning: '_declspec' initialized and declared 'extern'

C:/Dev-Cpp/include/id3/utils.h:95: error: conflicting declaration 'ID3_Err dami::_declspec'

C:/Dev-Cpp/include/id3/utils.h:81: error: 'dami::_declspec' has a previous declaration as 'size_t dami::_declspec'

C:/Dev-Cpp/include/id3/utils.h:95: error: 'dllimport' was not declared in this scope

C:/Dev-Cpp/include/id3/utils.h:96: warning: '_declspec' initialized and declared 'extern'

C:/Dev-Cpp/include/id3/utils.h:96: error: conflicting declaration 'ID3_Err dami::_declspec'

C:/Dev-Cpp/include/id3/utils.h:81: error: 'dami::_declspec' has a previous declaration as 'size_t dami::_declspec'

C:/Dev-Cpp/include/id3/utils.h:96: error: 'dllimport' was not declared in this scope

C:/Dev-Cpp/include/id3/utils.h:97: warning: '_declspec' initialized and declared 'extern'

C:/Dev-Cpp/include/id3/utils.h:97: error: conflicting declaration 'ID3_Err dami::_declspec'

C:/Dev-Cpp/include/id3/utils.h:81: error: 'dami::_declspec' has a previous declaration as 'size_t dami::_declspec'

C:/Dev-Cpp/include/id3/utils.h:97: error: 'dllimport' was not declared in this scope

C:/Dev-Cpp/include/id3/utils.h:98: warning: '_declspec' initialized and declared 'extern'

C:/Dev-Cpp/include/id3/utils.h:98: error: conflicting declaration 'ID3_Err dami::_declspec'

C:/Dev-Cpp/include/id3/utils.h:81: error: 'dami::_declspec' has a previous declaration as 'size_t dami::_declspec'

C:/Dev-Cpp/include/id3/utils.h:98: error: 'dllimport' was not declared in this scope

C:/Dev-Cpp/include/id3/tag.h:137: warning: '_declspec' initialized and declared 'extern'

C:/Dev-Cpp/include/id3/tag.h:137: error: 'dllimport' was not declared in this scope

C:/Dev-Cpp/include/id3/tag.h:137: error: expected ',' or ';' before 'ID3_IsTagHeader'

Mógłby mi ktoś z tym pomóc?


(Ryan) #2

Nie dałeś wszystkich plików - brak definicji ID3_C_EXPORT która jest przyczyną problemów.