[mythtv] Problems with playlist.cpp in svn 10287 of mythmusic plugin
Warren Volz
warren at warrenvolz.com
Sat Jun 24 08:18:18 UTC 2006
I ran into trouble compiling mythmusic due to a error related to the
use of an STL map. This is for svn 10287 (last changed 10202) of myth
plugins/mythmusic. Here is the exact error:
ccache g++ -c -pipe -march=pentiumpro -I/opt/kde/include/artsc -
pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -Wall -W -
O3 -Wall -Wno-switch -fomit-frame-pointer -I/usr/include/SDL -
D_REENTRANT -D_REENTRANT -DPIC -fPIC -D_GNU_SOURCE -DPREFIX=\"/usr/
local\" -DMMX -Di386 -DUSING_FREEBOX -D_FILE_OFFSET_BITS=64 -
DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_PLUGIN -DQT_SHARED -I/usr/lib/
qt/mkspecs/default -I. -I../../../../../include -I/usr/kde/3.3/
include -I../../../../../include -I../../../../../../X11R6/include -I/
usr/include/cdda -I/usr/lib/qt/include -I../../../../../../X11R6/
include -o playlist.o playlist.cpp
playlist.cpp: In member function `int Playlist::writeTree
(GenericTree*, int)':
playlist.cpp:888: error: ISO C++ forbids declaration of `map' with no
type
playlist.cpp:888: error: template-id `map<QString, uint32_t>' used as a
declarator
playlist.cpp:888: error: parse error before `;' token
playlist.cpp:889: error: `AlbumMap' undeclared (first use this function)
playlist.cpp:889: error: (Each undeclared identifier is reported only
once for
each function it appears in.)
playlist.cpp:973: error: `Ialbum' undeclared (first use this function)
playlist.cpp:973: error: `album_map' undeclared (first use this
function)
playlist.cpp:978: error: parse error before `::' token
make[1]: *** [playlist.o] Error 1
make[1]: Leaving directory `/usr/local/src/mythtv/plugins-svn/
mythmusic/mythmusic'
make: *** [sub-mythmusic] Error 2
This is with GCC version 3.3.4. The fix for this was to add an
include for <map> at the top before the namespace declaration. It
looks like this was specified in main.cpp instead of playlist.cpp
where it's used.
-Warren
More information about the mythtv-dev
mailing list