• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 158
  • Last Modified:

Link Warning message question

I'm using VC++ 6.0 and MFC. My workspace
has 2 projects -- my main one, and one
which is a JPEG lib that is pointed to
from codeguru.  I think its since I added that JPEG project into my stuff
that I sometimes (why not always?) get
the linker warning: LINK : warning LNK4098: defaultlib "LIBC" conflicts with use of other libs; use /NODEFAULTLIB:library

Of course, if I follow this advice and
put in the /NODEFAULTLIB I get a zillion
undefineds, so...

It may mean that something else is wrong
with my setup.  However, I see no adverse effects -- everything seems to
work fine, so I've just been ignoring the warning, but now I'm getting ready to export my app, I'm wondering if I
should worry about this??  What do you

  • 2
  • 2
1 Solution
That is because the JPEG lib contains the CRT library and it results more than one copy of the CRT library. You may ignore it. See

Linker Tools Warning LNK4098

HOWTO: Link with the Correct C Run-Time (CRT) Library
Actually, it's not always safe to ignore this warning message.

..B ekiM
>it's not always safe to ignore this warning message.

Not always. But it is OK in this case. Am I right?
> But it is OK in this case. Am I right?

There's no way to tell. But, odds are, it isn't.  If you mix flavors of CRTL in the same image, you're most likely to get memory management problems.

tullhead used /NODEFAULTLIB and got lots of unresolved externals because he didn't bother to eplicitly name the CRTL version he wanted, and therefore all CRTL functions were unresolved.

..B ekiM
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Train for your Pen Testing Engineer Certification

Enroll today in this bundle of courses to gain experience in the logistics of pen testing, Linux fundamentals, vulnerability assessments, detecting live systems, and more! This series, valued at $3,000, is free for Premium members, Team Accounts, and Qualified Experts.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now