Asked by duncanb7
at 2024-07-08 10:48:22
Point:500 Replies:6 POST_ID:828563USER_ID:11059
Topic:
C++ Programming Language;C Programming Language;Java Programming Language
TOday I complier old cpp program(year of 2005) with cl.exe and link.exe from VS 10.0 VC++ at command line and run the program, it found error as follows
LINK:fatal error LNK1104: cannot open file "nafxcw.lib"
And google it for the solution as follows
2.8: Why do I get an unresolved external on nafxcw.lib or uafxcw.lib? (top)
The files nafx*.lib and uafx*.lib are the static LIB versions of MFC. The files beginning with "n" are the ANSI version, and the files beginning with "u" are the Unicode version. By default, only the ANSI files are installed on your hard drive. If the linker cannot find these LIB files, copy them from your Visual C++ CD to your <VCdir>vc98mfclib directory.
If those files are not on your CD, then you have an edition of Visual C++ that does not support static linking to MFC. You will need to change your project settings to use the DLL version of MFC. Click Project->Settings and go the General tab. In the Microsoft Foundation Classes combo box, select Use MFC in a Shared DLL.
http://www.codeproject.com/Articles/1248/The-Code-Project-Visual-C-Forum-FAQ
Just want to know how to run link.exe at command line with option to include
DLL of MFC...
I check at MS at http://msdn.microsoft.com/en-us/library/y0zzbyt4(v=vs.71).aspx
nothing say about this.
Anyway, just want to solve the fatal error issue about no file of nfxcw.lib at
command line with cl.exe and link.exe
Please advise
Duncan