Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. Error in compilation of a library
Forum Updated to NodeBB v4.3 + New Features

Error in compilation of a library

Scheduled Pinned Locked Moved Unsolved 3rd Party Software
2 Posts 2 Posters 1.7k Views 1 Watching
  • 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.
  • M Offline
    M Offline
    MadDan
    wrote on last edited by
    #1

    Hello,
    I am having problems when trying to compile a library that is supposed to work with Visual Studio.
    I get this error:
    #error Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version. Please #define _AFXDLL or do not use /MD[d]
    from the afx.h file.

    There are a lot of soltion on the internet, but all are assuming that one is using VS to handle the project. I am using Qt creator with Qt 5.9.1 .
    Is there a way around to solve this issue?

    Please let me know if the problem is not clear or more details are needed.
    Thanks

    raven-worxR 1 Reply Last reply
    0
    • M MadDan

      Hello,
      I am having problems when trying to compile a library that is supposed to work with Visual Studio.
      I get this error:
      #error Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version. Please #define _AFXDLL or do not use /MD[d]
      from the afx.h file.

      There are a lot of soltion on the internet, but all are assuming that one is using VS to handle the project. I am using Qt creator with Qt 5.9.1 .
      Is there a way around to solve this issue?

      Please let me know if the problem is not clear or more details are needed.
      Thanks

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @MadDan
      well it says to define _AFXDLL. This can be easily done in your .pro file by adding DEFINES += _AFXDLL

      Alternatively most VS project settings result in a simple call parameter on the compiler. The same compiler is used by QtCreator. So you can also set compiler parameters by adding QMAKE_CXXFLAGS += -O1 for example.

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      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