Like Tree1Likes
  • 1 Post By Salem

Help with id3lib

This is a discussion on Help with id3lib within the C++ Programming forums, part of the General Programming Boards category; Hi all, I'm working on windows with Visual Studio. I'm trying to work with id3lib in order to read and ...

  1. #1
    Registered User
    Join Date
    Nov 2012
    Posts
    4

    Help with id3lib

    Hi all,

    I'm working on windows with Visual Studio.
    I'm trying to work with id3lib in order to read and write id3 tag (songs tag).
    I have two problems, first of all i don't really know to implement a new library in visual studio.
    I've tried a lot and finally i think i succeed in it, but when i'm trying to run a simple code with the library, something like this:

    Code:
    #include <id3/tag.h>
    #include <id3/readers.h>
    #include <id3/writers.h>
    #include <iostream>
    using namespace std;
    
    
    int main() { 
    
    
    ID3_Tag myTag;
    myTag.Link("test.mp3");
    
    return 0;
    }
    I got these errors:
    Code:
    Error    10    error LNK2019: unresolved external symbol "public: unsigned int __thiscall ID3_Tag::Link(char const *,unsigned short)" (?Link@ID3_Tag@@QAEIPBDG@Z) referenced in function _main
    Error    11    error LNK2019: unresolved external symbol "public: __thiscall ID3_Tag::ID3_Tag(char const *)" (??0ID3_Tag@@QAE@PBD@Z) referenced in function _main    
    
    
    Error    12    error LNK1120: 3 unresolved externals
    Can someone please help with to figure out what is the problem here? is something wrong with the code or its an installation problem?

    p.s. for more information about the id3lib - id3lib Library Documentation

    Thanks,
    Gal

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,544
    C++ Programming/Compiler/Linker/Libraries/Configuring Visual Studio - Wikibooks, open books for an open world
    You need to tell the linker two things:
    1. Where to find additional libraries.
    2. The names of additional libraries.
    rags_to_riches likes this.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User
    Join Date
    Nov 2012
    Posts
    4
    Quote Originally Posted by Salem View Post
    C++ Programming/Compiler/Linker/Libraries/Configuring Visual Studio - Wikibooks, open books for an open world
    You need to tell the linker two things:
    1. Where to find additional libraries.
    2. The names of additional libraries.
    thanks for the help,

    I did the steps above as in the guide.
    It looks better now, but now I get the following errors:


    Code:
    ‘memcpy’ was not declared in this scope
    ‘memmove’ was not declared in this scope
    make: *** [main.o] Error 1    test
    the code stays the same as before.
    I tried to read about this problem and I found some solutions like adding #include <cstring>, but it didn't help.

    Can you please help me? I really want to install this library so I can use it and it seems impossible.

    Thanks,
    Gal.

  4. #4
    Registered User
    Join Date
    Nov 2012
    Location
    Some rock floating in space...
    Posts
    32

    Lightbulb

    Quote Originally Posted by VanVan View Post
    thanks for the help,

    I did the steps above as in the guide.
    It looks better now, but now I get the following errors:


    Code:
    ‘memcpy’ was not declared in this scope
    ‘memmove’ was not declared in this scope
    make: *** [main.o] Error 1    test
    the code stays the same as before.
    I tried to read about this problem and I found some solutions like adding #include <cstring>, but it didn't help.

    Can you please help me? I really want to install this library so I can use it and it seems impossible.

    Thanks,
    Gal.
    Try including <string.h> and <stdlib.h> or <memory> for c++ version in the namespace std

  5. #5
    Registered User
    Join Date
    Nov 2012
    Location
    Some rock floating in space...
    Posts
    32
    I just checked... memcpy and the like are indeed defined in <cstring> and NOT <memory>.... Including <cstring> in your program should have fixed it... Not sure why you're getting that error about it "not being declared in this scope"

  6. #6
    Registered User
    Join Date
    Nov 2012
    Posts
    4
    Quote Originally Posted by twiki View Post
    I just checked... memcpy and the like are indeed defined in <cstring> and NOT <memory>.... Including <cstring> in your program should have fixed it... Not sure why you're getting that error about it "not being declared in this scope"
    Thanks for your help,
    I fix the problem it was my mistake, I declared the "cstring" after the "id3lib", when i change the order the problem was fixed.

  7. #7
    Registered User
    Join Date
    Nov 2012
    Location
    Some rock floating in space...
    Posts
    32
    Quote Originally Posted by VanVan View Post
    Thanks for your help,
    I fix the problem it was my mistake, I declared the "cstring" after the "id3lib", when i change the order the problem was fixed.
    You're welcome... Hope the coding goes well from here on out!

  8. #8
    Registered User
    Join Date
    Nov 2012
    Posts
    4
    I'm still trying to find how things are working in this class.

    I have problem reading tags that are not in English, for example when I'm trying to read song tags that are written in Hebrew there are looking like this when I'm print them:

    Code:
    Title/songname/content description
    �� �� ���
    I understand that I need to do something with the UNICODE

    Can someone help with this issue.
    and if someone know a good guide for this library "id3lib" it would be nice, thanks.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Compile id3lib for Windows
    By @nders in forum C Programming
    Replies: 1
    Last Post: 04-07-2006, 11:27 PM

Tags for this Thread


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21