Greetings:

We need to have a custom built version of Qt. Specifically Qt 5.6.1 with target windows: MSVS 2012/64bit, with the compiler switch -MD NOT -MDd …. Yes I know unusual compiler switch but what is required to develop dlls for a third part package.

So we can build the libs fine, and use them if we stick with cmake/nmake.

But when we try to use the libs inside Qt Creator we have major issues:

First I have created a qt.conf file and placed it in my libs bin dir the file looks like:
[Paths]
PREFIX = D:/users/MyName/QT/5.6.1/5.6.1_debug <- location of our custom build
ARCHDATA = .
DATA = .
DOCS = doc
HEADERS = include
LIBS = lib
PLUGINS = plugins
LIBEXECS = bin
BINS = bin
TESTS = tests
IMPORTS = imports
QML = qml
TRANSLATIONS = translations
SETTINGS = translations
Now to reinforce the -MD switch we add QMAKE_CFLAGS += -MD to the .pro file in the Qt Creator project.

This allows creator to think our libs are “valid”, and the build aspect of Creator works … well sort of. For some reason Qt Creator feels a need to convert -MD to -MDd … very bad.

How do I maintain -MD (... this is sort of a hybrid debug mode in a release build... I know ugly but required for the 3'rd party)

My hunch is in a need to have a custom QMAKE_SPEC? Is this the right direction to go? Ideas?

Regards
Carl