Is it possible to create an MFC static library (.lib) and link it to a non-MFC C++ application? If so, does anyone know how to create an MFC static library? Visual Studio doesn't seem to have any templates like that.
R – Creating & using an MFC static library
mfcstatic-librariesvisual studio
Related Topic
- Visual-studio – Open two instances of a file in a single Visual Studio session
- C# – How to remedy “The breakpoint will not currently be hit. No symbols have been loaded for this document.” warning
- .net – “The breakpoint will not currently be hit. The source code is different from the original version.” What does this mean
- Visual-studio – Error ‘LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt’ after installing Visual Studio 2012 Release Preview
- Visual-studio – Why is Visual Studio 2013 very slow
- R – How to catch VBScript runtime error “Object required: ‘Session'” on cmd line where Session isn’t defined for MSI
Best Answer
Well, it turns out that there is a template for an MFC static library; it's just well hidden—it's in the Win32 templates instead of the MFC templates.
All you have to do is create a standard Win32 project and choose "Static library". At that point the MFC checkbox is enabled and you're good to go.