Creating a static library under windows 7-64 with QT
Антон Сергунов
setosha at gmail.com
Tue Jul 25 19:28:53 UTC 2017
It should be something like
LIBS += -L<path to taglib.a> -ltaglib.a
вт, 25 июл. 2017 г., 23:06 Chaos Total <ChaosTotal at outlook.fr>:
> Hello,
>
>
> I am new to Tagscan. I dowloaded the library files (version 1.11.1) and,
> not being a user of CMake, I tried to compile them directly by adding to a
> Qt console project, whose "main" function just called a simple test
> function like
>
>
> void test()
>
> {
>
> TagLib::FileRef f("../test/Albeniz.mp3");
> TagLib::String title = f.tag()->title();
> wstring tit=title.toWString();
>
> wcout<<tit;
>
> }
>
>
> and it worked!! (with a '#define TAGLIB_STATIC').
>
>
> Than, I tried to create a static Taglib library: I created a new Qt
> "static library" project, added the .cpp and .h files to it as above, and
> built the library, generating a 'taglib.a' file. In another Qt console
> project I just call the same test() function and tried to link it to my
> static library using a statement 'LIBS += taglib.a' in the .pro file. It
> finds the library file, but does not link to any function, I get a long
> list of errors of the form
>
>
> -1: error: undefined reference to `_imp___ZN6TagLib8FileNameC1EPKc'
>
>
> etc. For some reason, the functions seem not available on the library. I
> suspect my library exports not to be correctly configured, but don't know
> what to do.
>
>
> Suggestions are welcome.
>
>
> Best,
>
>
> chaos = jc
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/taglib-devel/attachments/20170725/48287aab/attachment.html>
More information about the taglib-devel
mailing list