Writing a python build script for your Visual C++ project

If you’ve decided to write your own python build script for existing Visual Studio projects, then two questions would probably come up at first.
  1. What utility/commands are available for actually building *.sln/*. vcxproj files?
  2. How will you specify the appropriate version for your *.rc version resource file?
Solution for #1. You can download the MSBuild tools for free from the Microsoft download website, and it provides the solution you need. First, download the MS Build tools 2013(or 2015) depending on your Visual Studio project versions.
Solution for #2. You can easily modify/set the version number string on your *.rc resource file by using python regex. Here is the example.

Resolving the LNK2019 error while linking QT app

If you’re developing a QT based application(which links QT libs as statically) and get LNK2019unresolved external symbol’ link errors when you try to link the other static library,
Then you probably start looking those link settings such as,
☐ whether the architecture for the binary is correct(Are you trying to link an x86 lib to the x64 binary?)
☐ the static library file name specified to Input property was correct(Configuration Properties > Linker > Input > Additional Dependencies)
☐ they both use the same platform toolset or CRT lib(MT or MD)
☐ ‘dumpbin /headers’ for looking into export symbols
☐ or looking for some name mangling exists which might have caused the issue
However, if you’re still getting the LNK2019 unresolved link errors and it started frustrating although tried every setting you could, then you really should check the following setting as well.
The QT project seems to have the ’Treat WChar_t As Built in Type’ setting as ‘Noby default(see the attachment screen capture). However, Visual C++ static library project uses the option as Yes unless you haven’t changed it intentionally. Well, for me, the link error was resolved when I changed the option to Yes from the main QT application project settings.
qt_setting_1
Set to ‘Yes’ for the QT application to link a static library. Of course, it will be different in case you use different ‘Treat WChar_t As Built in Type’ setting  for the static library.
qt_setting_2
 source: http://stackoverflow.com/questions/6987006/linking-to-a-c-static-library-from-a-qt-application