Solved

getting linking error

Posted on 2004-04-15
8
408 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
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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to determine file rename from EventLog ? 2 49
bigDiff challenge 17 106
wordmultiple challenge 12 132
Problem to event 3 96
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
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…
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.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

770 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