Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. afx.h:24: error: C1189: #error: Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version. Please #define _AFXDLL or do not use /MD[d]
QtWS25 Last Chance

afx.h:24: error: C1189: #error: Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version. Please #define _AFXDLL or do not use /MD[d]

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 2 Posters 2.1k Views
  • 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 Offline
    P Offline
    Pradeep2121
    wrote on 18 Nov 2020, 15:29 last edited by
    #1

    Qt Creator 4.13.2(based on Qt 5.15.1)

    I have mfc dependent visual studio 2015 generated static lib file which I am trying to use in QT creator. I have given all the dependency and include path in QT.
    I have tried all the options in the link below but it's not working for me.

    https://forum.qt.io/topic/82666/error-in-compilation-of-a-library/2

    Please share your suggestions.

    J 1 Reply Last reply 18 Nov 2020, 15:33
    0
    • P Pradeep2121
      18 Nov 2020, 15:29

      Qt Creator 4.13.2(based on Qt 5.15.1)

      I have mfc dependent visual studio 2015 generated static lib file which I am trying to use in QT creator. I have given all the dependency and include path in QT.
      I have tried all the options in the link below but it's not working for me.

      https://forum.qt.io/topic/82666/error-in-compilation-of-a-library/2

      Please share your suggestions.

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 18 Nov 2020, 15:33 last edited by
      #2

      @Pradeep2121 Did you do what was suggested in the thread you linked?
      What Qt version do you use (what you posted is the Qt version used by QtCreator).
      Do you use Mcrosoft C++ compiler?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      P 1 Reply Last reply 18 Nov 2020, 15:45
      0
      • J jsulm
        18 Nov 2020, 15:33

        @Pradeep2121 Did you do what was suggested in the thread you linked?
        What Qt version do you use (what you posted is the Qt version used by QtCreator).
        Do you use Mcrosoft C++ compiler?

        P Offline
        P Offline
        Pradeep2121
        wrote on 18 Nov 2020, 15:45 last edited by
        #3

        @jsulm Yes, I have tried out the things provided in the link. 2ebb00a5-a6f9-498e-b178-9c28acb8480a-image.png
        I am using Visual studio 2015 for creating a static library. This library will be used by the UI application created using QT

        J 1 Reply Last reply 18 Nov 2020, 15:50
        0
        • P Pradeep2121
          18 Nov 2020, 15:45

          @jsulm Yes, I have tried out the things provided in the link. 2ebb00a5-a6f9-498e-b178-9c28acb8480a-image.png
          I am using Visual studio 2015 for creating a static library. This library will be used by the UI application created using QT

          J Offline
          J Offline
          jsulm
          Lifetime Qt Champion
          wrote on 18 Nov 2020, 15:50 last edited by jsulm
          #4

          @Pradeep2121 You did not answer any of my questions.
          I already told you that I'm not interested in knowing which Qt version was used to build QtCreator, so please don't post "About Qt Creator" dialog screen-shot. Tell us which Qt version you use to build your project.
          And please tell us whether you're using SAME Visual Studio compiler to compile your Qt project.
          And again: did you try what was suggested in the link you posted?!

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          P 1 Reply Last reply 18 Nov 2020, 16:01
          0
          • J jsulm
            18 Nov 2020, 15:50

            @Pradeep2121 You did not answer any of my questions.
            I already told you that I'm not interested in knowing which Qt version was used to build QtCreator, so please don't post "About Qt Creator" dialog screen-shot. Tell us which Qt version you use to build your project.
            And please tell us whether you're using SAME Visual Studio compiler to compile your Qt project.
            And again: did you try what was suggested in the link you posted?!

            P Offline
            P Offline
            Pradeep2121
            wrote on 18 Nov 2020, 16:01 last edited by
            #5

            @jsulm Sorry, I am new to QT so was not able to answer you correctly. My apologies. I think my QT version use to build my project is "Qt 5.9.9 MSVC2015 32bit" and "Qt 5.9.9 MSVC2015 64bit".

            J 1 Reply Last reply 18 Nov 2020, 16:08
            0
            • P Pradeep2121
              18 Nov 2020, 16:01

              @jsulm Sorry, I am new to QT so was not able to answer you correctly. My apologies. I think my QT version use to build my project is "Qt 5.9.9 MSVC2015 32bit" and "Qt 5.9.9 MSVC2015 64bit".

              J Offline
              J Offline
              jsulm
              Lifetime Qt Champion
              wrote on 18 Nov 2020, 16:08 last edited by
              #6

              @Pradeep2121 OK. That should match. Please check the link you posted - the was a suggestion what to do (the error message already suggests what to do).

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0

              3/6

              18 Nov 2020, 15:45

              • Login

              • Login or register to search.
              3 out of 6
              • First post
                3/6
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved