Question

After hours of research (and tries) on how to install id3lib on Qt (windows), but with no success, I decided to use TagLib's library.

I followed this tutorial to build a compatible version of taglib for Qt but still another problem (full log here):

  ...

  C:\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe: Dwarf
  Error: found dwarf version '4', this reader only handles version 2 and 3
  information.

  C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../mingw32/lib/crt2.o:crt1.c:(.text+0x1f1):
  undefined reference to `__chkstk_ms'

  ...

In CMake, I did configure > MinGW Makefiles.

Can anyone tell how to fix it?

Environment:

  • Windows 7 (64-bit);
  • CMake 2.8.12.1;
  • TagLib 1.9.1;
  • GCC 3.4.5;
  • Qt 5.1.1.
Was it helpful?

Solution

The problem stems from the fact that you are using terribly outdated GCC, while your Qt binaries are most likely built with bleeding-edge GCC (or the one close to it). For instance, as the error message shows, DWARF is outdated in case of your current GCC and is incompatible with the one used by your current Qt. Furthermore, even if it wouldn't, you'd still hit other problems with binary incompatibilities, since you essentially mix compilers with different major version numbers, which is strongly discouraged. Notice, that your problem has nothing to do with CMake at all. You can see it yourself in the error message, i.e. the error is reported by ld, the linker utility from (your outdated) GCC toolchain. To conclude, your only option is to update GCC, ideally exactly to the one which was used to build your current Qt.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top