简体   繁体   中英

VS2013 C++ LINK : fatal error LNK1104: cannot open file 'mfc110ud.lib'

Background (History) of the problem:

  1. all was fine after upgrading (and fine tuning) this 50+k lines C++ project from VC6 to VS2008 to VS2012 (all in 32 bits)
  2. upgraded to VS2013 (Premium) for compatibility with 3rd party program, and all was fine, after (painful) fine tuning all to Unicode, except: Edit and Continue (EnC) is not working anymore.

    A few posts exist on that reported EnC problem on the fora, with one suggesting that one setting was ok in VS2013 'Ultimate' (viz. disable the new IntelliTrace, available in that version only). NB: that problem has apparently been solved by MSFT in VS2015, but the 3rd party program is not yet validated for that version.

  3. installed VS2013 Ultimate: all is fine but EnC is still not working, and is greatly missed, when fine tuning dialogs for instance; thus
  4. opening the project back in VS2012 (to be able to use EnC), and changing Project > Properties > Config > General > Platform Toolset to 'VS110' (the name of VS2012):

    --> LINK : fatal error LNK1104: cannot open file 'mfc120ud.lib' (Note: this is the MFC debug Unicode dll library for the 'VS2013' platform)

  5. now, when I reopen the project back in the VS2013 IDE, with the same VS110 Platform Toolset, the same error pops up at build time,

  6. and when I change the Platform Toolset to 'VS120' (name of VS2013), the error changes to LINK : fatal error LNK1104: cannot open file 'mfc110ud.lib', the MFC debug Unicode library for VS2012...

I find the switch of the errors and the environments puzzling. The last three steps are repeatable. The IDE is closed before any change. Would an OS reboot change anything, and if yes why? Should a configuration file (like .vcxproj, .vcxproj.user, .suo, .sdf, .sln, or other) be deleted?

All help in understanding and fixing this behavior will be greatly appreciated.

The problem is "CharSet". Each charset will build its own *.dll. You must choose the "MBCS" not the "Unicode" in "Project -> Properties -> ConfigurationProperties -> Common -> ProjectDefault -> CharSet".

我正在使用VS2012,同时尝试将平台更改为Win32。该错误已得到解决。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM