By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,310 Members | 1,430 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,310 IT Pros & Developers. It's quick & easy.

linking error in VC7.0

P: n/a
Kay
I already specified to ignore specific library:
MSVCPRT.lib MSVCRT.lib LIBC.lib MSVCRTD.lib LIBCD.lib
command line is like:
/INCREMENTAL /NOLOGO /DLL /NODEFAULTLIB:"MSVCPRT.lib MSVCRT.lib LIBC.lib
MSVCRTD.lib LIBCD.lib"

but I am still getting conflict linking problems. But if I do specify
/NODEFAULTLIB, I'll get anther bunch of linking errors. Anybody knows why?
thanks,

-Kay
Linking...

LIBC.lib(crt0dat.obj) : error LNK2005: _exit already defined in
msvcrtd.lib(MSVCR70D.dll)

LIBC.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in
msvcrtd.lib(cinitexe.obj)

LIBC.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in
msvcrtd.lib(cinitexe.obj)

LIBC.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in
msvcrtd.lib(cinitexe.obj)

LIBC.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in
msvcrtd.lib(cinitexe.obj)

mfcs70d.lib(dllmodul.obj) : warning LNK4006: _DllMain@12 already defined in
MSVCRT.lib(dllmain.obj); second definition ignored

LIBC.lib(crt0dat.obj) : warning LNK4006: _exit already defined in
MSVCRT.lib(MSVCR70.dll); second definition ignored

LIBC.lib(crt0init.obj) : warning LNK4006: ___xc_z already defined in
MSVCRT.lib(cinitexe.obj); second definition ignored

LIBC.lib(crt0init.obj) : warning LNK4006: ___xc_a already defined in
MSVCRT.lib(cinitexe.obj); second definition ignored

LIBC.lib(crt0init.obj) : warning LNK4006: ___xi_z already defined in
MSVCRT.lib(cinitexe.obj); second definition ignored

LIBC.lib(crt0init.obj) : warning LNK4006: ___xi_a already defined in
MSVCRT.lib(cinitexe.obj); second definition ignored

Creating library Debug/jsnopt.lib and object Debug/jsnopt.exp

LINK : warning LNK4098: defaultlib 'msvcrtd.lib' conflicts with use of other
libs; use /NODEFAULTLIB:library

LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other
libs; use /NODEFAULTLIB:library

LINK : warning LNK4098: defaultlib 'LIBC' conflicts with use of other libs;
use /NODEFAULTLIB:library

LINK : warning LNK4098: defaultlib 'LIBCD' conflicts with use of other libs;
use /NODEFAULTLIB:library
Nov 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Kay,

It seems you build your solution using both single-threaded static CRT and
multi-threaded CRT. Check /ML, /MT or /MD settings in your projects and
ensure that you are using one version of CRT in libs and apps that consume
the libs.

Thanks,
--
Nikola Dudar
Visual C++; // Program Manager
This posting is provided "AS IS" with no warranties, and confers no rights.

"Kay" <ka******@interchange.ubc.ca> wrote in message
news:Oy**************@tk2msftngp13.phx.gbl...
I already specified to ignore specific library:
MSVCPRT.lib MSVCRT.lib LIBC.lib MSVCRTD.lib LIBCD.lib
command line is like:
/INCREMENTAL /NOLOGO /DLL /NODEFAULTLIB:"MSVCPRT.lib MSVCRT.lib LIBC.lib
MSVCRTD.lib LIBCD.lib"

but I am still getting conflict linking problems. But if I do specify
/NODEFAULTLIB, I'll get anther bunch of linking errors. Anybody knows why?
thanks,

-Kay
Linking...

LIBC.lib(crt0dat.obj) : error LNK2005: _exit already defined in
msvcrtd.lib(MSVCR70D.dll)

LIBC.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in
msvcrtd.lib(cinitexe.obj)

LIBC.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in
msvcrtd.lib(cinitexe.obj)

LIBC.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in
msvcrtd.lib(cinitexe.obj)

LIBC.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in
msvcrtd.lib(cinitexe.obj)

mfcs70d.lib(dllmodul.obj) : warning LNK4006: _DllMain@12 already defined
in MSVCRT.lib(dllmain.obj); second definition ignored

LIBC.lib(crt0dat.obj) : warning LNK4006: _exit already defined in
MSVCRT.lib(MSVCR70.dll); second definition ignored

LIBC.lib(crt0init.obj) : warning LNK4006: ___xc_z already defined in
MSVCRT.lib(cinitexe.obj); second definition ignored

LIBC.lib(crt0init.obj) : warning LNK4006: ___xc_a already defined in
MSVCRT.lib(cinitexe.obj); second definition ignored

LIBC.lib(crt0init.obj) : warning LNK4006: ___xi_z already defined in
MSVCRT.lib(cinitexe.obj); second definition ignored

LIBC.lib(crt0init.obj) : warning LNK4006: ___xi_a already defined in
MSVCRT.lib(cinitexe.obj); second definition ignored

Creating library Debug/jsnopt.lib and object Debug/jsnopt.exp

LINK : warning LNK4098: defaultlib 'msvcrtd.lib' conflicts with use of
other libs; use /NODEFAULTLIB:library

LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other
libs; use /NODEFAULTLIB:library

LINK : warning LNK4098: defaultlib 'LIBC' conflicts with use of other
libs; use /NODEFAULTLIB:library

LINK : warning LNK4098: defaultlib 'LIBCD' conflicts with use of other
libs; use /NODEFAULTLIB:library

Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.