views:

280

answers:

1

In my Windows CE DLL project, I am trying to tell Visual C++ to link statically to MFC in a project that originally did not use MFC. However, upon linking successfully, Dependency Walker (depends.exe) says that my DLL is dynamically linked to MFC80U.DLL and MSVCR90.DLL. Has anyone else encountered this bug?

If "Use of MFC" is set to "Use Standard Windows Libraries", and the code that needs MFC is removed, neither of these DLLs is linked in. How can I get true static linking to MFC and standard libraries?

+1  A: 

It seems I was linking to a static library, made by another developer, that was configured to link dynamically to MFC. Apparently Visual C++ decided to ignore my requests for static linking and used the dynamic link setting from the static library. After I obtained a new version of the library that was set to use static linking, the dynamic linking disappeared.

Qwertie