|
-
December 27th, 2016, 04:28 PM
#1
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
-
December 28th, 2016, 05:07 AM
#2
Re: Migrating from VS2005 to VS2015 Still Tries to Link MFC 8
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
All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!
C++23 Compiler: Microsoft VS2022 (17.6.5)
-
December 28th, 2016, 10:20 AM
#3
Re: Migrating from VS2005 to VS2015 Still Tries to Link MFC 8
 Originally Posted by 2kaud
Thanks for the link. I will look into this and let you know.
FF
-
December 28th, 2016, 03:25 PM
#4
Re: Migrating from VS2005 to VS2015 Still Tries to Link MFC 8
 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
-
December 28th, 2016, 10:14 PM
#5
Re: Migrating from VS2005 to VS2015 Still Tries to Link MFC 8
What happens when you compile in release mode?
-
December 29th, 2016, 10:22 AM
#6
Re: Migrating from VS2005 to VS2015 Still Tries to Link MFC 8
 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
-
December 29th, 2016, 11:24 PM
#7
Re: Migrating from VS2005 to VS2015 Still Tries to Link MFC 8
 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?
-
December 30th, 2016, 11:50 AM
#8
Re: Migrating from VS2005 to VS2015 Still Tries to Link MFC 8
 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
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|