I need to add translation for an old VS C++ application. This application and all the .lib files it implicitly links to are compiled by using MFC as Static Library.
To translate the app into other languages I need to include resource dll’s explicitly. I make use of the object CDynLinkLibrary defined in the #include <afxdll_.h>.
Now the problem is I get the error message fatal error C1189: #error : file must be compiled with _AFXDLL when I include the header afxdll_.h.
Changing my project to use MFC as a shared library is not an option due to many reasons. How can I work around with this limitations?
Instead of using
CDynLinkLibrary, useLoadLibraryExto load the DLL and callAfxSetResourceHandleto start using the resources from that DLL.