?
Solved

getting linking error

Posted on 2004-04-15
8
Medium Priority
?
424 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
Percona Live Europe 2017 | Sep 25 - 27, 2017

The Percona Live Open Source Database Conference Europe 2017 is the premier event for the diverse and active European open source database community, as well as businesses that develop and use open source database software.

 
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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…
In this post we will learn different types of Android Layout and some basics of an Android App.
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 video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses
Course of the Month10 days, 20 hours left to enroll

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