taglib-devel Digest, Vol 158, Issue 4

Modoran George modoran.george at gmail.com
Sun Oct 14 12:47:20 BST 2018


Did you define TAGLIB_STATIC macro in "prepocessor directives" ?

În dum., 14 oct. 2018 la 14:00, <taglib-devel-request at kde.org> a scris:

> Send taglib-devel mailing list submissions to
>         taglib-devel at kde.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         https://mail.kde.org/mailman/listinfo/taglib-devel
> or, via email, send a message with subject or body 'help' to
>         taglib-devel-request at kde.org
>
> You can reach the person managing the list at
>         taglib-devel-owner at kde.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of taglib-devel digest..."
>
>
> Today's Topics:
>
>    1. Using taglib with Visual Studio 2017 (Harry Mannbacker)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sat, 13 Oct 2018 20:25:03 -0400
> From: Harry Mannbacker <harrymannbacker at gmail.com>
> To: taglib-devel at kde.org
> Subject: Using taglib with Visual Studio 2017
> Message-ID:
>         <
> CAFN38PrkV8dTOaX+OBpUrED_fSCgevNiFv1DoO2RaibjBry6gg at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> I'm attempting to use TagLib with Visual Studio 2017, and I'm having some
> difficulties getting the examples to work, specifically with respect to
> linker errors.  Here is a summary of what I've done so far:
>
> The first course of action I took was to build TagLib using Visual Studio
> 2017 Community Edition.  I followed the directions in the INSTALL file and
> used CMake to create the appropriate Visual Studio .sln file.  In Visual
> Studio, I compiled the "tag" project and saw that a .lib static library was
> created called tag.lib.
>
> Next, I created a Windows console project called "retag4" within its own
> solution; I culled together all the header files associated with TagLib,
> and then I changed the properties of retag4 as follows:
>
>  - Under C/C++, I set "Additional Include Directories" to the location
> where I kept all the TagLib header files (I did this for All
> Configurations)
>  - Under Linker -> General, I updated "Additional Library Directories" to
> point to the location where my tag.lib file resides.
>  - Under Linker -> Input, I added "tag.lib" to "Additional Dependencies".
>
> To test the tag.lib build, I pasted the code from examples/tagreader.cpp
> into retag4.cpp.  Specifically, I pasted in the #include directives and the
> main() function.  Initially, I don't see any compilation errors in Visual
> Studio, however when I do a full build on retag4, I get two C4251 warnings
> with the message:
>
> 'TagLib::FileName::m_name': class
> 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>' needs
> to have dll-interface to be used by clients of class 'TagLib::FileName'
>
> 'TagLib::FileName::m_wname': class
>
> 'std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>'
> needs to have dll-interface to be used by clients of class
> 'TagLib::FileName'
>
> There are also a series of LNK2019 errors with verbiage like this:
>
> unresolved external symbol "__declspec(dllimport) public: virtual
> __thiscall TagLib::String::~String(void)" (__imp_??1String at TagLib@@UAE at XZ)
> referenced in function _main
>
> Based on the first warning, it looks as though the _WIN32 macro is defined
> upon compilation, but it's not clear to me why I'm getting a warning here.
> I've even tried rebuilding the tag project within the TagLib library such
> that it produces a .dll instead of a static .lib, but this results in MSVS
> complaining about an invalid .dll file.
>
> Apologies if this is a more basic question; I'm still fairly new to Windows
> programming.  Am I going down the correct path using Visual Studio to
> compile my retag4 code?  Should I be building a .lib file or a .dll file in
> this instance?
>
> Thanks for any assistance you can provide.
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://mail.kde.org/pipermail/taglib-devel/attachments/20181013/5b6bc553/attachment-0001.html
> >
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> taglib-devel mailing list
> taglib-devel at kde.org
> https://mail.kde.org/mailman/listinfo/taglib-devel
>
>
> ------------------------------
>
> End of taglib-devel Digest, Vol 158, Issue 4
> ********************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/taglib-devel/attachments/20181014/31dcfe31/attachment.html>


More information about the taglib-devel mailing list