Issue Building

2009-02-13
2013-06-12
  • Raymond Bennett

    Raymond Bennett - 2009-02-13

    Can anybody please help. I believe I downloaded all of the right components now, but when I try to build (Visual Studio 2008) I get the following error:

    Error    3    fatal 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]    c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\afx.h    24    Console

     
    • Kirill

      Kirill - 2009-02-14

      Raymond,

      how did you end up building an MFC application? As far as I can see, Console has "Use of MFC" set to "Use Standard Windows Libraries", which makes all the sense, given that Console uses WTL.

      Anyway, a solution could be to use statically-linked CRT by changing Configuration Properties -> C/C++ -> Code Generation -> Runtime Library to Multi-threaded (/MT) or Multi-threaded Debug (/MTd). The bonus is that msvcrt.dll is not required. That's actually how I'm building versions, available from my site (http://kirill.ca).

      Or you can do what the error says and define _AFXDLL (either in Configuration Properties or in Console\stdafx.h)

      Hope it helps a bit.

      --
      Kirill.

       
    • Raymond Bennett

      Raymond Bennett - 2009-02-14

      Kirill,

      When I switch to /MT or define _AFXDLL I get a different error instead:

      Error    3    fatal error C1189: #error :  WINDOWS.H already included.  MFC apps must not #include <windows.h>    g:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\afxv_w32.h    16    Console

      What do you mean by "how did you end up building an MFC application?". I just downloaded it and built it as is, so it seems it is MFC by default?

       
    • Raymond Bennett

      Raymond Bennett - 2009-02-14

      Nevermind, I went with /MTd, and I think I had the wrong tabbedframework, but now it builds.

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks