?
Solved

getting linking error

Posted on 2004-04-15
8
Medium Priority
?
440 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
6 Comments
 
LVL 7

Expert Comment

by:leflon
ID: 10834235
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
ID: 10839477
How and from where I will execute this file /VERBOSE:LIB
0
 

Author Comment

by:fastnet5
ID: 10839517
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 7

Expert Comment

by:leflon
ID: 10839861
have you done a rebuild all?

leflon
0
 

Author Comment

by:fastnet5
ID: 10840117
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 200 total points
ID: 10840182
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

839 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