There is a problem with gcc 3.4.
g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../include/id3 -I../include
-Wno-deprecated -Wno-deprecated -Wno-deprecated -O2 -Wall
-Wno-unused -Wno-inline -Woverloaded-virtual
-Wmissing-declarations -c field.cpp -MT field.lo -MD -MP
-MF .deps/field.TPlo -fPIC -DPIC
cc1plus: warning: command line option
"-Wmissing-declarations" is valid for C/ObjC but not for C++
cc1plus: warning: command line option
"-Wmissing-declarations" is valid for C/ObjC but not for C++
In file included from field.cpp:33:
../include/id3/readers.h: In member function `virtual uint32
ID3_IStreamReader::getCur()':
../include/id3/readers.h:60: error: cannot convert
`std::streampos' to `uint32' in return
make[2]: *** [field.lo] Error 1
make[2]: Leaving directory
`/var/tmp/portage/id3lib-3.8.3-r1/work/id3lib-3.8.3/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/var/tmp/portage/id3lib-3.8.3-r1/work/id3lib-3.8.3'
make: *** [all] Error 2
Logged In: YES
user_id=89364
In general, the private definitions of many standard datatypes that this project
uses are going to cause more and more problems as STL changes underneath
it. Here's a minimally-invasive patch that solves the particular problem
mentioned in this bug (compiles cleanly on FreeBSD 4.9, but the resulting
executable has not been tested):
--- include/id3/reader.h.orig Sat Mar 1 19:23:00 2003
+++ include/id3/reader.h Mon Mar 15 01:37:19 2004
@@ -28,6 +28,10 @@
#ifndef _ID3LIB_READER_H_
#define _ID3LIB_READER_H_
+#if defined(__GNUC__) && (__GNUC__ == 3) && (__GNUC_MINOR__
>= 4)
+#include <string> // for std::streampos and pos_type
+#endif
+
#include "id3/globals.h" //has <stdlib.h> "id3/sized_types.h"
class ID3_CPP_EXPORT ID3_Reader
@@ -35,7 +39,11 @@
public:
typedef uint32 size_type;
typedef uint8 char_type;
+#if defined(__GNUC__) && (__GNUC__ == 3) && (__GNUC_MINOR__
>= 4)
+ /* pos_type is a typedef of std::streampos in g++ 3.4 */
+#else
typedef uint32 pos_type;
+#endif
typedef int32 off_type;
typedef int16 int_type;
static const int_type END_OF_READER;