[geeks] Visual Studio programming question

Joshua D Boyd jdboyd at cs.millersville.edu
Wed May 22 22:57:02 CDT 2002


Yes, I'm working in the dark side at the moment.  But, it is for school.

Anyway, I'm getting a buttload of linking error that I can't figure out how
to resolve.  One library I'm using had this to say:
    You're using the wrong run-time C-library. The VHS is compiled to link
    against the Multithreaded Debug DLL, so you need to change your link 
    options in Visual C++ to reflect this. To do this open up your projects
    settings tab. Choose the C/C++ tab. In the pull down menu "Categorty", 
    select "Code Generation". In this window, from the pull down window 
    "Use run-time library", choose Debug Multithreaded DLL. 

So, I followed that, and it cut the number of errors and warnings 
dramatically, but I can't figure out what to do about the rest.

I'm writing a win32 program that uses WTK (so a wierd half breed between
gui and console application) and Immersion's Impulse engine.  

I found a note in MSDN on a related topic:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/LNK4098.asp
But when I try the remedies suggested, things just get worse.  It seems that
WTK wants samething other than MSVRCTD.lib.  I have a different project
that uses both impulse and WTK, but I can't find the difference that makes
a difference.

-- 
Joshua D. Boyd

LIBC.lib(crt0dat.obj) : error LNK2005: _exit already defined in MSVCRTD.lib(MSVCRTD.dll)
LIBC.lib(crt0dat.obj) : error LNK2005: __exit already defined in MSVCRTD.lib(MSVCRTD.dll)
LIBC.lib(osfinfo.obj) : error LNK2005: __open_osfhandle already defined in MSVCRTD.lib(MSVCRTD.dll)
LIBC.lib(crt0.obj) : error LNK2005: _mainCRTStartup already defined in MSVCRTD.lib(crtexe.obj)
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)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: __read already defined in LIBC.lib(read.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: __close already defined in LIBC.lib(close.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: __write already defined in LIBC.lib(write.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: __lseek already defined in LIBC.lib(lseek.obj)
LIBC.lib(crt0dat.obj) : warning LNK4006: _exit already defined in MSVCRTD.lib(MSVCRTD.dll); second definition ignored
LIBC.lib(crt0dat.obj) : warning LNK4006: __exit already defined in MSVCRTD.lib(MSVCRTD.dll); second definition ignored
LIBC.lib(osfinfo.obj) : warning LNK4006: __open_osfhandle already defined in MSVCRTD.lib(MSVCRTD.dll); second definition ignored
LIBC.lib(crt0.obj) : warning LNK4006: _mainCRTStartup already defined in MSVCRTD.lib(crtexe.obj); second definition ignored
LIBC.lib(crt0init.obj) : warning LNK4006: ___xc_z already defined in MSVCRTD.lib(cinitexe.obj); second definition ignored
LIBC.lib(crt0init.obj) : warning LNK4006: ___xc_a already defined in MSVCRTD.lib(cinitexe.obj); second definition ignored
LIBC.lib(crt0init.obj) : warning LNK4006: ___xi_z already defined in MSVCRTD.lib(cinitexe.obj); second definition ignored
LIBC.lib(crt0init.obj) : warning LNK4006: ___xi_a already defined in MSVCRTD.lib(cinitexe.obj); second definition ignored
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: __read already defined in LIBC.lib(read.obj); second definition ignored
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: __close already defined in LIBC.lib(close.obj); second definition ignored
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: __write already defined in LIBC.lib(write.obj); second definition ignored
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: __lseek already defined in LIBC.lib(lseek.obj); second definition ignored
   Creating library gallbladder.lib and object gallbladder.exp
LINK : warning LNK4098: defaultlib "MSVCRTD" 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 "MSVCRT" conflicts with use of other libs; use /NODEFAULTLIB:library
LINK : warning LNK4098: defaultlib "LIBCMT" conflicts with use of other libs; use /NODEFAULTLIB:library



More information about the geeks mailing list