|
 |
|
 |
07-27-2006, 05:12 PM
|
#1 (permalink)
|
|
C++ Intermediate
Join Date: Feb 2006
Posts: 15
|
Looking for C++ ID3 library
I'm looking for a library that's relatively easy-to-use for C++ that allows the reading of ID3 tags (tags like song names and artist and such from MP3).
I've tried ID3Lib, but when trying to compile the source or using the binaries, nothing from it ever works and always comes up with errors.
I'm using DevCpp (MinGW compiler).
Thanks.
|
|
|
07-28-2006, 04:20 AM
|
#2 (permalink)
|
|
Senior Contributor
Join Date: Mar 2005
Posts: 678
|
what kind of errors?
my compilations of ID3Lib in both, static and dynamic, do work without errors.
|
|
|
07-28-2006, 07:32 AM
|
#3 (permalink)
|
|
C++ Intermediate
Join Date: Feb 2006
Posts: 15
|
Well, it's mostly me having trouble figuring out how to compile the source of the ID3Lib. I have the source, but no matter what I add to the project, or what include folders I put in, it always comes up with:
"In file included from e:\id3lib-3.8.3\include\id3.h" it highlights "#include "id3/globals.h" " in id3.h. Next message below that says:
"from ../id3lib-3.8.3/src/c_wrapper.cpp"
then below that
#error read message above or win32.readme.first.txt
that txt file is for visual studio.
then: "in file included from ../id3lib-3.8.3/src/c_wrapper.cpp"
then goes on with a series of "ID3_C_EXPORT does not name a type" and expected symbols and such.
in DevCpp, if you try to open a .dsp or .dsw, it only opens the .dsp file itself, in text form.
|
|
|
07-28-2006, 11:53 AM
|
#5 (permalink)
|
|
C++ Intermediate
Join Date: Feb 2006
Posts: 15
|
using the tools, i created a .a file and a .def file, and then attached them in the linker area of the compiler.
It resembled something I've tried before: if i define ID3LIB_LINKOPTION to 1, and only have the .a file in the linker, i get [Linker error] undefined reference to `ID3_Tag::ID3_Tag(char const*)'
if i put in -def id3lib.def, i get a long series of "symbol not defined."
I think I'm doing something incorrectly somewhere..
|
|
|
07-28-2006, 04:51 PM
|
#6 (permalink)
|
|
C++ Intermediate
Join Date: Feb 2006
Posts: 15
|
How would I go about compiling this with DevCpp? I'm probably making this harder than it really is, it's just I haven't ever done this before, least with an ide.
|
|
|
07-28-2006, 05:31 PM
|
#7 (permalink)
|
|
Senior Contributor
Join Date: Mar 2005
Posts: 678
|
ID3_Tag::ID3_Tag(char const*) ???
It's not a class nor a namespace. It's pure C.
Code:
ID3Tag *FileID3 = ID3Tag_New();
ID3Tag_LinkWithFlags(FileID3, "example.mp3", ID3TT_ID3);
if (ID3Tag_HasTagType(FileID3, ID3TT_ID3V2))
{
MessageBox(0,"We have an ID3v2 tag!", "");
}
if (ID3Tag_HasTagType(FileID3, ID3TT_ID3V1))
{
MessageBox(0,"We have an ID3v1 tag!", "");
}
ID3Tag_Clear(FileID3);
Why? Because you can't use classes that are compiled with one compiler into another compiler.
my id3lib.dll is compiled using MS VS6 but used with many compilers.
|
|
|
07-28-2006, 05:58 PM
|
#8 (permalink)
|
|
C++ Intermediate
Join Date: Feb 2006
Posts: 15
|
Then do you know how to get this to work with DevCpp? I'm using DevCpp with MinGW.
|
|
|
07-29-2006, 03:02 AM
|
#9 (permalink)
|
|
Senior Contributor
Join Date: Mar 2005
Posts: 678
|
you know what this means??
Code:
[Linker error] undefined reference to `ID3_Tag::ID3_Tag(char const*)'
|
|
|
07-29-2006, 07:33 AM
|
#10 (permalink)
|
|
C++ Intermediate
Join Date: Feb 2006
Posts: 15
|
I believe it means that it doesn't know what those definitions are. I think those are solved by adding in a linker value to the library that contains the definitions. Even upon doing so, I still got the same linker errors.
|
|
|
07-29-2006, 08:23 AM
|
#11 (permalink)
|
|
Senior Contributor
Join Date: Mar 2005
Posts: 678
|
almost, it means that one of your files (.h/.cpp) is requesting a call to ID3_Tag::ID3_Tag(char const*)
Everything compiled into your application (.a, .h, .cpp, etc.) doesn't have such class/namespace ID3_Tag with the ID3_Tag(char const*) method.
Therefore you must find out which file is calling it and which library is needed for that call to work.
If ID3_Tag is a class that you created then find out which OTHER file is using that class and then.
Code:
#include "ID3_Tag.h"
|
|
|
07-29-2006, 09:35 AM
|
#12 (permalink)
|
|
C++ Intermediate
Join Date: Feb 2006
Posts: 15
|
Code:
#include <id3/globals.h>
#include <id3.h>
#include <id3/tag.h>
#include <id3/field.h>
#include <id3/helpers.h>
#include <id3/id3lib_frame.h>
#include <id3/id3lib_strings.h>
#include <id3/id3lib_streams.h>
#include <id3/io_decorators.h>
#include <id3/io_helpers.h>
#include <id3/io_strings.h>
#include <id3/writer.h>
#include <id3/writers.h>
#include <id3/utils.h>
#include <id3/reader.h>
#include <id3/readers.h>
#include <id3/sized_types.h>
I've included all of these into the project, linked in -id3lib.a to the linker, defined ID3LIB_LINKOPTION to be either 1 or 3, set resource files to where the DLL is, put in the include paths where the above includes are located, ID3_Lib.h doesn't exist.
Still getting the same type ofLinker Error, [Linker error] undefined reference to `ID3_Tag::Link(char const*, unsigned short)' or I'm getting E:\Dev-Cpp\Makefile.win [Build Error] [ProjectFrm.obj] Error 1
|
|
|
07-29-2006, 03:13 PM
|
#13 (permalink)
|
|
Senior Contributor
Join Date: Mar 2005
Posts: 678
|
show your full code, i can't help any further this way. It's like finding a needle in...
|
|
|
07-29-2006, 03:44 PM
|
#14 (permalink)
|
|
C++ Intermediate
Join Date: Feb 2006
Posts: 15
|
my full code would take about 30 seconds of scrolling if i posted it all. and it's closed-source.
the relevant part to ID3Lib is:
that's it. I'm merely trying to put ID3Lib functionality just to simply read ID3 tags, so i'm starting with the simple test to make sure the library works.
|
|
|
07-29-2006, 04:28 PM
|
#15 (permalink)
|
|
Newbie
Join Date: Jun 2002
Location: Denmark
Posts: 1,713
|
Quote:
|
so i'm starting with the simple test to make sure the library works.
|
WEll 30 sec. of scrollign wouldn't rectify that statement, simplest test would mean somthing like the code DJ shown you.. Nothing near the amount you're trying to pass off...
By the way, the part, is like trying to find a popstickel on the northpole.. while you're located on antarctica...
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -8. The time now is 01:44 PM.
|
Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting
|
 |
|