Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I'm kinda new at Visual C++, getting a link error 3

Status
Not open for further replies.

miltonic

Programmer
Jun 24, 2002
5
0
0
US
I'm getting this link error when trying to build my project.

LINK : warning LNK4098: defaultlib "MSVCRT" conflicts with use of other libs; use /NODEFAULTLIB:library

I looked up on the MSDN library for LNK4098 and it said I'm trying to link with incompatible libraries. I don't really know much about the linking process and how it works in Visual C++. If anyone knows what I can do to fix this, and/or can recommend a book that teaches how to use Visual Studio C++ 6.0, it would be much appreciated. Ivor Horton's Beginning Visuall C++ 6.0 is more of a progrmaming tutorial for C++ than using Visual Studio. I'm looking for a book that teaches in depth how to use Visual Studio. Thanks for reading.
 
I haven't seen this, but I think that the answer to the problem lies in your question.
Go to the project settings and in the link options, enter the following:

/NODEFAULTLIB:MSVCRT

Once again, I am not sure abt the answer ;)
Coming to books, did you try the SAMS series, there should be books pertaining to VC++6.0, but I think that it is not important to learn the IDE. Things will improve by asking questions on the net, but it would be wise to invest in really good C++ books like the Primer by Stanley Lippman
L8R and HTH Welcome to the Pythian Games!
Long live Godess Athena!
dArktEmplAr of Delphi Oracle
 
This is not an issue... here is what I get from my most recent build. It is just a warning. I believe it has to do with a #define but I am not sure which one.

LINK : warning LNK4098: defaultlib "MSVCRT" conflicts with use of other libs; use /NODEFAULTLIB:library
LINK : warning LNK4098: defaultlib "LIBCD" conflicts with use of other libs; use /NODEFAULTLIB:library

Matt
 
I think I remember getting similar errors at one point as well... if I remember correctly, my issue was that I was trying to link release-built libraries into a debug build session.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top