Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 07-27-2006, 05:12 PM   #1 (permalink)
Anakashar
C++ Intermediate
 
Anakashar's Avatar
 
Join Date: Feb 2006
Posts: 15
Anakashar is on a distinguished road
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.
Anakashar is offline   Reply With Quote
Old 07-28-2006, 04:20 AM   #2 (permalink)
DJMaze
Senior Contributor
 
DJMaze's Avatar
 
Join Date: Mar 2005
Posts: 678
DJMaze is on a distinguished road
what kind of errors?

my compilations of ID3Lib in both, static and dynamic, do work without errors.
DJMaze is offline   Reply With Quote
Old 07-28-2006, 07:32 AM   #3 (permalink)
Anakashar
C++ Intermediate
 
Anakashar's Avatar
 
Join Date: Feb 2006
Posts: 15
Anakashar is on a distinguished road
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.
Anakashar is offline   Reply With Quote
Old 07-28-2006, 10:47 AM   #4 (permalink)
DJMaze
Senior Contributor
 
DJMaze's Avatar
 
Join Date: Mar 2005
Posts: 678
DJMaze is on a distinguished road
http://tunesplayer.com/downloads/id3lib.zip

here's an old one, just create your id3lib.a file.
DJMaze is offline   Reply With Quote
Old 07-28-2006, 11:53 AM   #5 (permalink)
Anakashar
C++ Intermediate
 
Anakashar's Avatar
 
Join Date: Feb 2006
Posts: 15
Anakashar is on a distinguished road
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..
Anakashar is offline   Reply With Quote
Old 07-28-2006, 04:51 PM   #6 (permalink)
Anakashar
C++ Intermediate
 
Anakashar's Avatar
 
Join Date: Feb 2006
Posts: 15
Anakashar is on a distinguished road
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.
Anakashar is offline   Reply With Quote
Old 07-28-2006, 05:31 PM   #7 (permalink)
DJMaze
Senior Contributor
 
DJMaze's Avatar
 
Join Date: Mar 2005
Posts: 678
DJMaze is on a distinguished road
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.
DJMaze is offline   Reply With Quote
Old 07-28-2006, 05:58 PM   #8 (permalink)
Anakashar
C++ Intermediate
 
Anakashar's Avatar
 
Join Date: Feb 2006
Posts: 15
Anakashar is on a distinguished road
Then do you know how to get this to work with DevCpp? I'm using DevCpp with MinGW.
Anakashar is offline   Reply With Quote
Old 07-29-2006, 03:02 AM   #9 (permalink)
DJMaze
Senior Contributor
 
DJMaze's Avatar
 
Join Date: Mar 2005
Posts: 678
DJMaze is on a distinguished road
you know what this means??
Code:
[Linker error] undefined reference to `ID3_Tag::ID3_Tag(char const*)'
DJMaze is offline   Reply With Quote
Old 07-29-2006, 07:33 AM   #10 (permalink)
Anakashar
C++ Intermediate
 
Anakashar's Avatar
 
Join Date: Feb 2006
Posts: 15
Anakashar is on a distinguished road
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.
Anakashar is offline   Reply With Quote
Old 07-29-2006, 08:23 AM   #11 (permalink)
DJMaze
Senior Contributor
 
DJMaze's Avatar
 
Join Date: Mar 2005
Posts: 678
DJMaze is on a distinguished road
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"
DJMaze is offline   Reply With Quote
Old 07-29-2006, 09:35 AM   #12 (permalink)
Anakashar
C++ Intermediate
 
Anakashar's Avatar
 
Join Date: Feb 2006
Posts: 15
Anakashar is on a distinguished road
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
Anakashar is offline   Reply With Quote
Old 07-29-2006, 03:13 PM   #13 (permalink)
DJMaze
Senior Contributor
 
DJMaze's Avatar
 
Join Date: Mar 2005
Posts: 678
DJMaze is on a distinguished road
show your full code, i can't help any further this way. It's like finding a needle in...
DJMaze is offline   Reply With Quote
Old 07-29-2006, 03:44 PM   #14 (permalink)
Anakashar
C++ Intermediate
 
Anakashar's Avatar
 
Join Date: Feb 2006
Posts: 15
Anakashar is on a distinguished road
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:

Code:
ID3_Tag Tag;
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.
Anakashar is offline   Reply With Quote
Old 07-29-2006, 04:28 PM   #15 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,713
redhead is on a distinguished road
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
Code:
ID3_Tag Tag;
part, is like trying to find a popstickel on the northpole.. while you're located on antarctica...
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Looking for a good Image Loading/Writing Library in C teknomage1 Platform/API C++ 3 07-23-2006 08:41 PM
Joost library complete Java 1 07-21-2006 09:46 PM
J2ME Library call ballina Java 1 07-21-2004 07:38 AM
Installing and using CMUgraphics library. Valmont Standard C, C++ 12 03-29-2003 08:39 AM
String Library MacTool Standard C, C++ 23 03-15-2003 03:17 PM


All times are GMT -8. The time now is 01:44 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting