Gen Build Tool "LNK1104: cannot open file 'mfc140.lib'"
search cancel

Gen Build Tool "LNK1104: cannot open file 'mfc140.lib'"

book

Article ID: 45801

calendar_today

Updated On:

Products

Gen Gen - Workstation Toolset Gen - Run Time Distributed Gen - Host Encyclopedia

Issue/Introduction

When trying to generate and build Gen Sample Model Cooperative Window Manager W900, a link error occurs in Build Tool.
According to the Release Notes, any compiler starting with VS2010 or above can be used. 

...Linking Load Module stub W900 

link /NOLOGO /SUBSYSTEM:WINDOWS -entry:WinMainCRTStartup -out:"C:\Gen\model86\sGUImsi.ief\c\W900.EXE" /DELAYLOAD:WRGN.DLL "C:\Gen\model86\sGUImsi.ief\c\OBJC\STUB.OBJ" "C:\Gen\model86\sGUImsi.ief\c\OBJC\STUBMAIN.OBJ" "C:\Gen\model86\sGUImsi.ief\c\STUB.RES" @"C:\Gen\model86\sGUImsi.ief\c\STUB.LNK" 

LINK : fatal error LNK1104: cannot open file 'mfc140.lib' 

NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\BIN\link.EXE"' : return code '0x450' 

Stop. 


Using VS2012 (OPT.VSVERSION = VS110).  Tried with OPT.BUILD_SRC set to Yes and No and neither work.

Environment

Release: 8.x
Component: Gen Build Tool

Resolution

A generate and install was done when OPT.BUILD_SRC was set to NO. Next, a generate and install was done when OPT.BUILD_SRC was set to YES. 

The problem is that the second generate and install was using residual files from the first generate and install. Doing a Build Tool Clean (or deleting the ...\model.ief\c directory), setting OPT.BUILD_SRC to YES, generating and installing fixed the problem.