Migrating from VS2005 to VS2015 Still Tries to Link MFC 8
Hi...
I am trying to migrate a large MFC solution from VS2005 to VS2015. The solution contains 170 projects. After a lot of work, all projects compile and 168 of them link. One that does not link is petty, but pesky, and I may return to that in another post. The other that does not link is the project that generates the program executable.
* The error that it generates is LNK1104: Cannot Open 'mfc80d.lib'.
* If I ignore MFC80d.lib, I get LNK1104: Cannot Open 'mfcs80d.lib'.
* If I ignore that, I get LNK1104: Cannot Open 'daouuid.lib'
* And if I ignore that, I get any number of undefined externals such as CRect::...(), CSize::...(), CFile::...() and so on. This is presumably because I am not linking MFC at all.
I have found a lot of discussion about this but none of it seems to help me. I can find no explicit or implicit references to MFC 8 in my properties or any project file. My target platform is 8.1 and my platform toolset is 140.
Can anyone offer any suggestion?
If I may slip in a second question, do I need to worry about migrating DAO?
Thank you very much for any help that you can offer.
FF
Re: Migrating from VS2005 to VS2015 Still Tries to Link MFC 8
Quote:
I can find no explicit or implicit references to MFC 8 in my properties or any project file.
Have a look at this https://msdn.microsoft.com/en-us/library/bx5yfk7t.aspx
Re: Migrating from VS2005 to VS2015 Still Tries to Link MFC 8
Quote:
Originally Posted by
2kaud
Thanks for the link. I will look into this and let you know.
FF
Re: Migrating from VS2005 to VS2015 Still Tries to Link MFC 8
Quote:
Originally Posted by
2kaud
I have searched the Visual Studio headers as suggested by the link. The only explicit references to selecting MFC libraries are nested under #ifndef _AFX_NOFORCE_LIBS. Apparently _AFX_NOFORCE_LIBS is defined somewhere since the code is disabled. _AFX_NOFORCE_LIBS seems to relate to linking both MFC and CLR. I am not linking CLR since I don't have .NET functionality in the project. I have also tried to explicitly add the /defaultlib directive to the linker command line. It does not appear to be a recognized directive. I will continue to fight with this and hope for a reply. I
FF
Re: Migrating from VS2005 to VS2015 Still Tries to Link MFC 8
What happens when you compile in release mode?
Re: Migrating from VS2005 to VS2015 Still Tries to Link MFC 8
Quote:
Originally Posted by
Arjay
What happens when you compile in release mode?
Thanks for asking. I have been thinking about that too. It will take some days of work to get the release build configured throughout the solution. I will work towards that and let you know. Of course, I will still need to get the debug builds working.
FF
Re: Migrating from VS2005 to VS2015 Still Tries to Link MFC 8
Quote:
Originally Posted by
FerroFun
Thanks for asking. I have been thinking about that too. It will take some days of work to get the release build configured throughout the solution. I will work towards that and let you know. Of course, I will still need to get the debug builds working.
FF
As a test, pick just one project that gives the error in debug mode and try to compile it in release mode. Also, use the find in files search feature and search all files for 'mfc80d'. Perhaps they are referenced some place unexpectedly?
Re: Migrating from VS2005 to VS2015 Still Tries to Link MFC 8
Quote:
Originally Posted by
Arjay
As a test, pick just one project that gives the error in debug mode and try to compile it in release mode. Also, use the find in files search feature and search all files for 'mfc80d'. Perhaps they are referenced some place unexpectedly?
Yes, thanks. I have searched for 'mfc80d' both internally within VS2015 and externally with the Windows 7 search tool. It is not found explicitly. Unfortunately, the one project that won't link because mfc80d.lib is not found is the project that generates the program executable. It depends on all other projects. I can remove many of them from the dependency list for the release build, but I still need to go through the migration process for fifteen or twenty projects that are critical dependencies. The rest are independent agents in the form of DLLs and can be ignored. I am going to start work on this on Monday, after the new year.
Have a Happy New Year and thanks for the consideration.
FF