convert an MFC application to MFC DLL

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hi,

I have an odd problem in converting MFC application to MFC DLL. As
already mentioned, I have an Visual C++ 6 MFC application which
contain some old C files and their headers. In the header files, most
variables were declared with keyword extern. After changing some
syntaxes, I was able to compile and run this application without any
problem using Visual Studio 2008.

However, when I tried to convert this application to MFC DLL by
creating a new MFC DLL project and importing all necessary files, I
ran into problems. Error LNK2001 shows that there are unresolved
symbol. The odd part is that all the unresolved symbols were declared
as an external variables. All the header files which contain extern
variables were included in a single main.cpp.

Can anyone give me some rough idea what I did wrong here?

Thanks,
Tom
.



Relevant Pages

  • Re: convert an MFC application to MFC DLL
    ... I have an odd problem in converting MFC application to MFC DLL. ... variables were declared with keyword extern. ... All the header files which contain extern ... extern variable declaration and the actual declartions/definitions ...
    (microsoft.public.vc.mfc)
  • Testing with DLLIMPORT in C#
    ... In a project I've a MFC DLL: ... __declspecint DoSomethingInC() ... public static extern int DoSomethingInC; ... Any way I can load the DLL without typing the whole address? ...
    (microsoft.public.dotnet.general)