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]
Forum Updated to NodeBB v4.3 + New Features

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.3k 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 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.

    jsulmJ 1 Reply Last reply
    0
    • P Pradeep2121

      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.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on 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
      0
      • jsulmJ jsulm

        @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 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

        jsulmJ 1 Reply Last reply
        0
        • P Pradeep2121

          @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

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on 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
          0
          • jsulmJ jsulm

            @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 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".

            jsulmJ 1 Reply Last reply
            0
            • P Pradeep2121

              @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".

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on 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

              • Login

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