Results 1 to 2 of 2

Thread: Using a custom built Qt in Qt Creator

  1. #1
    Join Date
    Jul 2016
    Posts
    1
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Using a custom built Qt in Qt Creator

    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

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,419
    Thanks
    37
    Thanked 1,546 Times in 1,496 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Using a custom built Qt in Qt Creator

    My approach would also have been to try with a custom mkspec instead of trying to set QMAKE_CFLAGS in .pro
    The configure a kit that used that mkspec and use that kit to configure the project

    Cheers,
    _

Similar Threads

  1. Replies: 3
    Last Post: 2nd August 2012, 13:46
  2. Need your help with designer plugin built with Creator
    By high_flyer in forum Qt Programming
    Replies: 4
    Last Post: 27th November 2010, 14:46
  3. Replies: 3
    Last Post: 11th May 2010, 04:50
  4. custom widgets in qt creator 4.6
    By tentakel in forum Newbie
    Replies: 3
    Last Post: 4th May 2010, 22:05

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.