LINK : fatal error LNK1104: cannot open file "nafxcwd.lib"

  • Thread starter Thread starter Hunter
  • Start date Start date
H

Hunter

Hi all,

I'm a C newbie in a desperate need of help. My background isn't
programming but engineering, so my programming skills are somewhat
limited (I am able to write simple single-threaded progs in C, but
hardly more than that). It just happened that my work requires me to
take a program and strip it off all kind of GUI, make it just a simple
command prompt thingie. And so I did, more or the less. Now, I didn't
remove any includes or anything of a kind, but my stripped proggie
consistently refuses to link (compiling is OK) and the error I get ts
the one in the subject. I searched all of my hard drive, this file
doesn't exist on it.
But the original program never "jumped" on it, as if it never required
it in a first place.

As I said I never added anything to the program, only removed some of
the GUI related code... And the new program seems to require something
that the old one never did...

I'm open to any suggestions, as due to my limited programming skills I
just don;t know where to look for the problem's root.

Thanks!
 
Hunter said:
OK guys, I found a solution on the microsoft support page, so if
anyone has this problem just got to: http://support.microsoft.com/kb/243458

Hunter:

Please don't multi-post; microsoft.public.vc.language is the best group
for native code questions, but the information that you are using the
Standard Edition does not appear in the posting you made there.

If you switch to dynamic linking of MFC, you will have to deploy
MFC42.DLL with your application. But a non-GUI application should not
need MFC at all.

When you change the type of a project (such as changing a GUI project to
Console, or vice versa) it is usually best to start a new project of the
kind you want, and then cut and paste the code.

Alternatively, if you use the free VC++ Express you will (I think) be
able to use static linking, and you will have a much better compiler.
 
Back
Top