Search code examples
c++windowslinuxqtporting

Qt migrating code from Linux to Windows


I use id3Tag library for my project. I set headers and libraries successfully on Linux and compiled without troubles, but I have some troubles with moving code to Windows. (I only started to study Windows, so sorry in advance for my possible ignorance). My environment is Qt Creator

The problem is with headers from id3 tag library (there are no such problems on Linux!) My .pro file is: enter image description here

My errors are: enter image description here

It's compiled perfectly if I don't include that header "id3/tag.h". What can be a reason? Actually I never programmed for Windows yet.
My steps are:
1. I complied part of code for Linux
2.Copied folder with source code that was successful compiled under Linux to Windows (headers are lying in the current folder).
3. Compiled code without that header ("id3/tag.h").
4. Added that header ("id3/tag.h")
5. And got a ton of complains from compiler

Thanks in advance, for any tips!


Solution

  • You should read the compiler's messages more carefully. It says to read win32.readme.first.txt, so I suggest you to read it and set your build environment to the way you want to link the library.

    It fails to compile because you have not set ID3LIB_LINKOPTION, resulting in the header not defining ID3_CPP_EXPORT. However, this is required to initialize ID3_Frame. See id3\globals.h for more details.