Building A static version of Qt 5.2.1 with Visual Studio 2013

后端 未结 2 1986
情深已故
情深已故 2021-02-08 23:02

I have been trying for a few days now to build a static version of Qt with Visual Studio 2013. I just cannot figure out what I did wrong.

System:

  • Windows 7
2条回答
  •  遇见更好的自我
    2021-02-08 23:26

    I happened to met with the same issue. I think the lib file you want to link against is translator_commond.lib. It contains the ANGEL symbols.

    Here is how I found out the name of the library, in case it could be helpful when you met with other unresolved external symbols with Qt.

    The dumpbin.exe tool is quite helpful here. You could execute dumpbin.exe /symbols some_lib.lib | findstr /c:"SOME_SYMBOL" to found whether a library contains or uses an symbol.

    Since there are so many libs in Qt, I simply search for all *.lib files in Qt directory and copy them into a single directory, and then I do a batch search using the command below.

    for %f in (*.lib) do echo %f >> symbols.txt && dumpbin /symbols %f | findstr /c:"SOME_SYMBOL" >> symbols.txt
    

    Once done, you could check the generated symbols.txt and find out the name of the library that contains the symbol you are looking for.

    BTW, since there are several huge libs, e.g. Qt5Core, Qt5Quick, etc, you probably would like to exclude them from searching.

提交回复
热议问题