如何在vc的项目中导入.obj文件

reddatura 2004-08-11 05:04:13
我把相应的几个obj文件放到debug目录
然后再link总指定路径
怎么link出现这么多错误

请指点




--------------------Configuration: RomConvert - Win32 Debug--------------------
Linking...
LZSD.OBJ : error LNK2005: _CopyString already defined in LZSD.OBJ
LZSD.OBJ : error LNK2005: _LZS_C_InitializeDecompressionHistory already defined in LZSD.OBJ
LZSD.OBJ : error LNK2005: _LZS_C_SizeOfDecompressionHistory already defined in LZSD.OBJ
LZSD.OBJ : error LNK2005: _ExpandLzsEngine already defined in LZSD.OBJ
LZSD.OBJ : error LNK2005: _EocdToken already defined in LZSD.OBJ
LZSD.OBJ : error LNK2005: _LZS_C_Decompress already defined in LZSD.OBJ
LZSC.OBJ : error LNK2005: _LZS_C_InitializeCompressionHistory already defined in LZSC.OBJ
LZSC.OBJ : error LNK2005: _LZS_C_InitializeHashBuckets already defined in LZSC.OBJ
LZSC.OBJ : error LNK2005: _ScrapBufferInitialize already defined in LZSC.OBJ
LZSC.OBJ : error LNK2005: _ScrapBufferUpdate already defined in LZSC.OBJ
LZSC.OBJ : error LNK2005: _SynchronizeSourcePointer already defined in LZSC.OBJ
LZSC.OBJ : error LNK2005: _PrepareScrapBufferForNextCall already defined in LZSC.OBJ
LZSC.OBJ : error LNK2005: _UpdateSource already defined in LZSC.OBJ
LZSC.OBJ : error LNK2005: _ReallyOutOfSource already defined in LZSC.OBJ
LZSC.OBJ : error LNK2005: _LZS_C_SizeOfCompressionHistory already defined in LZSC.OBJ
LZSC.OBJ : error LNK2005: _LZS_C_Compress already defined in LZSC.OBJ
LZSC.OBJ : error LNK2005: _LZS_C_FastEngine already defined in LZSC.OBJ
HIFNUTIL.OBJ : error LNK2005: _HIFN_UtilCopy already defined in HIFNUTIL.OBJ
HIFNUTIL.OBJ : error LNK2005: _HIFN_UtilMove already defined in HIFNUTIL.OBJ
HIFNUTIL.OBJ : error LNK2005: _HIFN_UtilClear already defined in HIFNUTIL.OBJ
HIFNUTIL.OBJ : error LNK2005: _HIFN_UtilGetRandomByte already defined in HIFNUTIL.OBJ
HIFNUTIL.OBJ : error LNK2005: _HIFN_UtilGetRandomU32b already defined in HIFNUTIL.OBJ
SPT_CMP.OBJ : error LNK2005: _cmpAlloc already defined in SPT_CMP.OBJ
SPT_CMP.OBJ : error LNK2005: _cmpRead already defined in SPT_CMP.OBJ
SPT_CMP.OBJ : error LNK2005: _cmpWrite already defined in SPT_CMP.OBJ
SPT_CMP.OBJ : error LNK2005: _cmpFree already defined in SPT_CMP.OBJ
SPT_CMP.OBJ : error LNK2005: _cmpSkip already defined in SPT_CMP.OBJ
msvcrtd.lib(MSVCRTD.dll) : error LNK2005: _free already defined in libc.lib(free.obj)
msvcrtd.lib(MSVCRTD.dll) : error LNK2005: _malloc already defined in libc.lib(malloc.obj)
msvcrtd.lib(MSVCRTD.dll) : error LNK2005: __setmbcp already defined in libc.lib(mbctype.obj)
LINK : warning LNK4098: defaultlib "LIBCD" conflicts with use of other libs; use /NODEFAULTLIB:library
LINK : warning LNK4098: defaultlib "msvcrtd.lib" conflicts with use of other libs; use /NODEFAULTLIB:library
SPT_CMP.OBJ : error LNK2001: unresolved external symbol _get16
SPT_CMP.OBJ : error LNK2001: unresolved external symbol _get16
SPT_CMP.OBJ : error LNK2001: unresolved external symbol _put16
SPT_CMP.OBJ : error LNK2001: unresolved external symbol _put16
SPT_CMP.OBJ : error LNK2001: unresolved external symbol _sptlen
SPT_CMP.OBJ : error LNK2001: unresolved external symbol _sptlen
Debug/RomConvert.exe : fatal error LNK1120: 3 unresolved externals
Error executing link.exe.

RomConvert.exe - 37 error(s), 2 warning(s)
...全文
184 点赞 收藏 3
写回复
3 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
reddatura 2004-08-11
我项 bluebohe(薄荷) ( )这样做的,错误变成了16个??




--------------------Configuration: RomConvert - Win32 Debug--------------------
Linking...
LIBCD.lib(crt0dat.obj) : error LNK2005: _exit already defined in msvcrtd.lib(MSVCRTD.dll)
LIBCD.lib(crt0dat.obj) : error LNK2005: __exit already defined in msvcrtd.lib(MSVCRTD.dll)
LIBCD.lib(dbgheap.obj) : error LNK2005: _malloc already defined in msvcrtd.lib(MSVCRTD.dll)
LIBCD.lib(dbgheap.obj) : error LNK2005: _calloc already defined in msvcrtd.lib(MSVCRTD.dll)
LIBCD.lib(dbgheap.obj) : error LNK2005: _free already defined in msvcrtd.lib(MSVCRTD.dll)
LIBCD.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in msvcrtd.lib(cinitexe.obj)
LIBCD.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in msvcrtd.lib(cinitexe.obj)
LIBCD.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in msvcrtd.lib(cinitexe.obj)
LIBCD.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in msvcrtd.lib(cinitexe.obj)
LIBCD.lib(winxfltr.obj) : error LNK2005: __XcptFilter already defined in msvcrtd.lib(MSVCRTD.dll)
msvcrtd.lib(MSVCRTD.dll) : error LNK2005: __setmbcp already defined in LIBCD.lib(mbctype.obj)
LINK : warning LNK4098: defaultlib "msvcrtd.lib" conflicts with use of other libs; use /NODEFAULTLIB:library
LINK : warning LNK4098: defaultlib "LIBCD" conflicts with use of other libs; use /NODEFAULTLIB:library
SPT_CMP.OBJ : error LNK2001: unresolved external symbol _get16
SPT_CMP.OBJ : error LNK2001: unresolved external symbol _put16
SPT_CMP.OBJ : error LNK2001: unresolved external symbol _sptlen
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/RomConvert.exe : fatal error LNK1120: 4 unresolved externals
Error executing link.exe.

RomConvert.exe - 16 error(s), 2 warning(s)
回复
bluebohe 2004-08-11
把.obj文件当成.c文件加入到当前工程的源程序文件表里面就行
回复
oyljerry 2004-08-11
这个错误不是obj文件的问题,你是不是缺少相关的头文件或库文件啊?
回复
相关推荐
发帖
VC/MFC
创建于2007-09-28

1.5w+

社区成员

VC/MFC相关问题讨论
申请成为版主
帖子事件
创建了帖子
2004-08-11 05:04
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……