From: Hunter on
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!

From: SvenC on
Hi Hunter,

Hunter wrote:
> Hi all,
>
> 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
> LINK : fatal error LNK1104: cannot open file "nafxcwd.lib"

Disable MFC usage in the project properties:

Project -> Properties -> Config Props -> General - > Use Of MFC == "Use
Standard Windows Libraries"

Also remove any #include "afx...h" lines. afxwin.h is usually included in
MFC projects and those will add lib dependencies with pragma directives
which override your project properties.

--
SvenC

From: David Wilkinson on
Hunter wrote:
> 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.

Hunter:

Please don't multi-post. Although SvenC's answer is correct, your post
does not make any sense without the information that you art using the
standard version of VC6, which you only provided in the other thread.
This is why multi-posting is so bad; the discussion gets fragmented.

--
David Wilkinson
Visual C++ MVP