Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    Unsolved I want to link some static .libs with my QT Creator project

    General and Desktop
    3
    8
    1081
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      pranavj95 last edited by

      I have tried using QMAKE_CXXFLAGS_DEBUG flag but I still get this error in QT :-

       qtmaind.lib(qtmain_win.obj):-1: error: LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MTd_StaticDebug' in main.obj
      
      K 1 Reply Last reply Reply Quote 0
      • K
        koahnig @pranavj95 last edited by

        @pranavj95

        Hi and welcome to devnet forum

        You need to give more details on OS and compiler versions.
        Also details of the actual static library you like to link (e.g. possible special compilation flags for the static library).

        Vote the answer(s) that helped you to solve your issue(s)

        P 2 Replies Last reply Reply Quote 0
        • P
          pranavj95 last edited by

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • P
            pranavj95 @koahnig last edited by

            @koahnig thanks for the warm welcome.

            I am using Win 10 with QT 5.10
            It is a custom made static library on Visual Studio. There aren't any special compilation flags which I am using to build the static library.

            1 Reply Last reply Reply Quote 0
            • P
              pranavj95 @koahnig last edited by

              @koahnig Correction : I am using Visual C++ 2015 Compiler

              1 Reply Last reply Reply Quote 0
              • SGaist
                SGaist Lifetime Qt Champion last edited by

                Hi and welcome to devnet,

                From the looks of it your custom library is linked against the static Visual Studio runtime so it clashes with Qt that is built agains the dynamic runtime.

                To make thing simple, link your static libraries to the dynamic runtime and you should be good to go.

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                P 1 Reply Last reply Reply Quote 0
                • P
                  pranavj95 @SGaist last edited by

                  @SGaist Could you tell me more about how to do that? I just got .lib files for the libraries.

                  1 Reply Last reply Reply Quote 0
                  • SGaist
                    SGaist Lifetime Qt Champion last edited by SGaist

                    Do you mean change the runtime type selection when building your custom libraries in Visual Studio ?

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post