Solved

getting linking error

Posted on 2004-04-15
8
401 Views
Last Modified: 2013-11-20
LINK : warning LNK4098: defaultlib "MSVCRT" conflicts with use of other libs; use /NODEFAULTLIB:library
how can I will solve this problem.
0
Comment
Question by:fastnet5
  • 3
  • 3
8 Comments
 
LVL 7

Expert Comment

by:leflon
Comment Utility
Hi fastnet5,

well this not really an error, its a warning. so your prog should link despite this message.
you get the warning when you use different kind of libs in your project
- debug vs. release
- single thread vs. multi thread
etc.
check the files in your project if some use a different settings than other.

you can use  /VERBOSE:LIB switch do determine which libs the linker is searching.

hth
leflon
0
 

Author Comment

by:fastnet5
Comment Utility
How and from where I will execute this file /VERBOSE:LIB
0
 

Author Comment

by:fastnet5
Comment Utility
I use this in option /VERBOSE:LIB  from .project->setting->link and there is option and get these message listed below

Compiling resources...
D:\Gaurav\Work\Project\Help\kidsfull\Login Manager\LatestLoginDll\LoginDll1.3\LoginDll.rc (133): warning RC4206 : title string too long; truncated at 256
Compiling...
DebugTrace.cpp
LoginDll.cpp
Generating Code...
Linking...
Searching Libraries
    Searching shfolder.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\kernel32.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\user32.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\gdi32.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\winspool.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\comdlg32.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\advapi32.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\shell32.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\ole32.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\oleaut32.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\uuid.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\odbc32.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\odbccp32.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\wininet.lib:
    Searching FileVacc.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\Shlwapi.lib:
    Searching C:\Program Files\Microsoft Visual Studio\VC98\LIB\LIBCMTD.lib:
    Searching C:\Program Files\Microsoft Visual Studio\VC98\LIB\OLDNAMES.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\version.lib:
    Searching C:\Program Files\Microsoft Visual Studio\VC98\LIB\libcimtd.lib:
    Searching C:\Program Files\Microsoft Visual Studio\VC98\LIB\libcpmtd.lib:
    Searching shfolder.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\kernel32.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\user32.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\gdi32.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\winspool.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\comdlg32.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\advapi32.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\shell32.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\ole32.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\oleaut32.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\uuid.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\odbc32.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\odbccp32.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\wininet.lib:
    Searching FileVacc.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\Shlwapi.lib:
    Searching C:\Program Files\Microsoft Visual Studio\VC98\LIB\LIBCMTD.lib:
    Searching C:\Program Files\Microsoft Visual Studio\VC98\LIB\OLDNAMES.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\version.lib:
    Searching C:\Program Files\Microsoft Visual Studio\VC98\LIB\libcimtd.lib:
    Searching C:\Program Files\Microsoft Visual Studio\VC98\LIB\libcpmtd.lib:
    Searching shfolder.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\kernel32.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\user32.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\gdi32.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\winspool.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\comdlg32.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\advapi32.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\shell32.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\ole32.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\oleaut32.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\uuid.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\odbc32.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\odbccp32.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\wininet.lib:
    Searching FileVacc.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\Shlwapi.lib:
Done Searching Libraries
   Creating library Debug/LoginDll.lib and object Debug/LoginDll.exp
Searching Libraries
    Searching shfolder.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\kernel32.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\user32.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\gdi32.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\winspool.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\comdlg32.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\advapi32.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\shell32.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\ole32.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\oleaut32.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\uuid.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\odbc32.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\odbccp32.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\wininet.lib:
    Searching FileVacc.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\Shlwapi.lib:
    Searching C:\Program Files\Microsoft Visual Studio\VC98\LIB\LIBCMTD.lib:
    Searching C:\Program Files\Microsoft Visual Studio\VC98\LIB\OLDNAMES.lib:
    Searching C:\Program Files\Microsoft Platform SDK\lib\version.lib:
    Searching C:\Program Files\Microsoft Visual Studio\VC98\LIB\libcimtd.lib:
    Searching C:\Program Files\Microsoft Visual Studio\VC98\LIB\libcpmtd.lib:
Done Searching Libraries
LINK : fatal error LNK1209: program database "D:\Gaurav\Work\Project\Help\kidsfull\Login Manager\LatestLoginDll\LoginDll1.3\Debug\LoginDll.pdb" differs from previous link; relink or rebuild
Error executing link.exe.

LoginDll.dll - 1 error(s), 1 warning(s)
0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
LVL 7

Expert Comment

by:leflon
Comment Utility
have you done a rebuild all?

leflon
0
 

Author Comment

by:fastnet5
Comment Utility
yes
Linking...
LINK : warning LNK4098: defaultlib "MSVCRT" conflicts with use of other libs; use /NODEFAULTLIB:library
LINK : fatal error LNK1209: program database "D:\Gaurav\Work\Project\Help\kidsfull\Login Manager\New Login (MFC)\LOGIN\Debug\Login.pdb" differs from previous link; relink or rebuild
Error executing link.exe.
I am getting this error whenever I try to build any program.
thanks
0
 
LVL 7

Accepted Solution

by:
leflon earned 50 total points
Comment Utility
hi fastnet5,
after using /VERBOSE:LIB once i would remove it from the project settings (don't really know why LNK1209 error appears, maybe you can delete the Login.pdb and do a rebuild all)

but for your original question, you may want to take a look at
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/LNK4098.asp
for a description of the LNK4098 warning.

i would enter /NODEFAULTLIB:msvcrt.lib to the linker settings and the warning should vanish.

hth
leflon
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now