Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6536149
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:27:25+00:00 2026-05-25T10:27:25+00:00

I don’t want to compile dynamic libs, so this question was not useful. I

  • 0

I don’t want to compile dynamic libs, so this question was not useful.

I downloaded taglib and compiled it using:

cmake -DENABLE_STATIC=ON -DENABLE_STATIC_RUNTIME=ON -DWITH_MP4=ON -G "Visual Studio 10"

That generates the Visual Studio solutions and I can compile the “tag” project which produces tag.lib in taglib/Release.

The problem comes when I try to use the library in a test application – nothing much, just a simple test:

#include "stdafx.h"
#include "fileref.h"

int _tmain(int argc, _TCHAR* argv[])
{
    TagLib::FileRef d("");
    return 0;
}

I get the following Linker errors:

Error   1   error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall TagLib::FileRef::~FileRef(void)" (__imp_??1FileRef@TagLib@@UAE@XZ)  C:\...\taglib_test\taglib_test\taglib_test.obj  taglib_test
Error   2   error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall TagLib::FileRef::FileRef(class TagLib::FileName,bool,enum TagLib::AudioProperties::ReadStyle)" (__imp_??0FileRef@TagLib@@QAE@VFileName@1@_NW4ReadStyle@AudioProperties@1@@Z)    C:\...\taglib_test\taglib_test\taglib_test.obj  taglib_test
Error   4   error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall TagLib::FileName::FileName(char const *)" (__imp_??0FileName@TagLib@@QAE@PBD@Z) C:\...\taglib_test\taglib_test\taglib_test.obj  taglib_test
Error   3   error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall TagLib::FileName::~FileName(void)" (__imp_??1FileName@TagLib@@QAE@XZ)   C:\...\taglib_test\taglib_test\taglib_test.obj  taglib_test
Error   5   error LNK1120: 4 unresolved externals   C:\...\taglib_test\Release\taglib_test.exe  taglib_test

Can somebody please give me an idea as to what’s going on here?

The following are the preprocessor defines in the tag project:

WIN32
_WINDOWS
NDEBUG
HAVE_CONFIG_H
_CRT_SECURE_NO_DEPRECATE
_CRT_NONSTDC_NO_DEPRECATE
TAGLIB_STATIC
CMAKE_INTDIR="Release"
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T10:27:25+00:00Added an answer on May 25, 2026 at 10:27 am

    For those who have had this problem:
    I fixed it by defining TAGLIB_STATIC in the test project:

    #include "stdafx.h"
    
    //This should have been generated by the build system in taglib_config.h
    //but was not. 
    #define TAGLIB_STATIC 
    #include "fileref.h"
    
    int _tmain(int argc, _TCHAR* argv[])
    {
        TagLib::FileRef d("");
        return 0;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Don't want to sort the entries. using this does not preserve the order as
Don't dismiss this as a newbie question! It's not, I'm not, I've tried everything,
I don't know if this question is trivial or not. But after a couple
Don't know if I worded the question right, but basically what I want to
Don't know if this has been asked before, so point me to another question
Don't know why this is happening, but after submitting a form via JS (using
Don't worry, I'm not going to ask that question, yet again... I am wanting
I don't know why this double json response are not successful: [{first_content:content,...}][{second_content:content,...}] So i
don't know if this is possible.. I'm using sqlite3 schema: CREATE TABLE docs (id
I don't know why this is not working. When a li element is clicked

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.