Solved

getting linking error

Posted on 2004-04-15
8
420 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
8 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
Technology Partners: 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 50 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

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
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.
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…

690 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