linking error in VC7.0

K

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
 
N

Nikola Dudar [MSFT]

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,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top