VC6.0+sp4使用ACE5.4静态链接库,mfc程序,链接时出错Linking...
msvcrt.lib(MSVCRT.dll) : error LNK2005: __errno already defined in libcmt.lib(dosmap.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _memmove already defined in libcmt.lib(memmove.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _wcscat already defined in libcmt.lib(wcscat.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _strchr already defined in libcmt.lib(strchr.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _wcscpy already defined in libcmt.lib(wcscat.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _strcspn already defined in libcmt.lib(strcspn.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _wcslen already defined in libcmt.lib(wcslen.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _strncmp already defined in libcmt.lib(strncmp.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _strncpy already defined in libcmt.lib(strncpy.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _wcsncpy already defined in libcmt.lib(wcsncpy.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _strpbrk already defined in libcmt.lib(strpbrk.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _strrchr already defined in libcmt.lib(strrchr.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _strspn already defined in libcmt.lib(strspn.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _strstr already defined in libcmt.lib(strstr.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _fclose already defined in libcmt.lib(fclose.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: __close already defined in libcmt.lib(close.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: __open_osfhandle already defined in libcmt.lib(osfinfo.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _fflush already defined in libcmt.lib(fflush.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _vsprintf already defined in libcmt.lib(vsprintf.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: __exit already defined in libcmt.lib(crt0dat.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _abort already defined in libcmt.lib(abort.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _atoi already defined in libcmt.lib(atox.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _getenv already defined in libcmt.lib(getenv.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: __itoa already defined in libcmt.lib(xtoa.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _strtol already defined in libcmt.lib(strtol.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _strtoul already defined in libcmt.lib(strtol.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _calloc already defined in libcmt.lib(calloc.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _free already defined in libcmt.lib(free.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _malloc already defined in libcmt.lib(malloc.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _realloc already defined in libcmt.lib(realloc.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: __isatty already defined in libcmt.lib(isatty.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: __beginthreadex already defined in libcmt.lib(threadex.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: __endthreadex already defined in libcmt.lib(threadex.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _tolower already defined in libcmt.lib(tolower.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: __stricmp already defined in libcmt.lib(stricmp.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: __strnicmp already defined in libcmt.lib(strnicmp.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _signal already defined in libcmt.lib(winsig.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _gmtime already defined in libcmt.lib(gmtime.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _localtime already defined in libcmt.lib(localtim.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _strftime already defined in libcmt.lib(strftime.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _time already defined in libcmt.lib(time.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: __tzset already defined in libcmt.lib(tzset.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _mktime already defined in libcmt.lib(mktime.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _exit already defined in libcmt.lib(crt0dat.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: __strdup already defined in libcmt.lib(strdup.obj)
LINK : warning LNK4098: defaultlib "msvcrt.lib" conflicts with use of other libs; use /NODEFAULTLIB:library
Release/win_test.exe : fatal error LNK1169: one or more multiply defined symbols found
Error executing link.exe.
忽略libcmt.lib,出现Linking...
nafxcw.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argv
nafxcw.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argc
nafxcw.lib(filelist.obj) : error LNK2001: unresolved external symbol __mbctype
nafxcw.lib(timecore.obj) : error LNK2001: unresolved external symbol __mbctype
nafxcw.lib(apphelp.obj) : error LNK2001: unresolved external symbol __mbctype
Release/win_test.exe : fatal error LNK1120: 3 unresolved externals搞定给100分!!!

解决方案 »

  1.   

    Preprocessor definitionsACE_AS_STATIC_LIBS已指定
      

  2.   

    不知什么原因。
    你可以试试再重新编译一次ACE
      

  3.   

    手上没有VC6,不能帮你,友情UP。
      

  4.   

    to 回复人: ahyf(笨笨) ( ) 信誉:96  
    ------------------------
    ACE static编译没有出错,config.h已指定使用mfc
      

  5.   

    在连接选项中设置 /nodefaultlib:libcmt.lib就可以了
      

  6.   

    这种问题通常是出在,有几个lib用的是不同的线程库所造成的
      

  7.   

    jiangfb(干是一种美德) (/nodefaultlib:libcmt.lib我设过啦,没有用
    -----------------
    to xubin_sh(徐彬) ( ) 信誉:100 已指定_MT选项!!我再看看……
      

  8.   

    感觉你静态连接了.obj,现在又编译dll造成的重定义!你查查
      

  9.   

    ???楼上,我的ACE是static lib我现在编译出错的是一个mfc程序,链接到aces.lib,没有编译dll啊
      

  10.   

    请问楼主一个问题,不好意思,我现在找不到懂ACE的人,
    我在安装ACE环境后,编译系统文件时:
    我用VC6。0编译AbstractBase.cpp时出错了, 
    error C2491: 'release' : definition of dllimport function not allowed
    error C2491: 'is_nil' : definition of dllimport function not allowed
    请问是什么问题?
      

  11.   

    我有ace的makefile(生成DLL,生成LIB)for vc,for mingw(不要下载cygwin),
    只需把路径一改就可以编译了,
    要是有人想帮我测试一下的话,email:[email protected]
      

  12.   

    to ekun001(阿昆) ( ) 信誉:100 你config.h是怎么写的
      

  13.   

    http://efsite.net/bbs/dvbbs/dispbbs.asp?boardid=8&id=44
    我已把makefile拷到这里了。有好心人帮我测试就再好不过了。
    email:[email protected]
      

  14.   

    楼上的,不行哦……还是出错nafxcw.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argv
    nafxcw.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argc
    nafxcw.lib(filelist.obj) : error LNK2001: unresolved external symbol __mbctype
    nafxcw.lib(timecore.obj) : error LNK2001: unresolved external symbol __mbctype
    nafxcw.lib(apphelp.obj) : error LNK2001: unresolved external symbol __mbctype连接还有了几个函数"未决的外问语法"
      

  15.   

    link /DLL /NOLOGO /OUT:dllvc\acedll.dll    @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\nma02088.
       Creating library dllvc\acedll.lib and object dllvc\acedll.exp
    ace_Capabilities.obj : error LNK2001: unresolved external symbol "public: int __thiscall ACE_Equal_To<class ACE_String_Base<char> >::operator()(class ACE_String_Base<char> const &,class ACE_String_Base<char> const &)const " (??R?$ACE_Equal_To@V?$ACE_String_Base@D@@@@QBEHABV?$ACE_String_Base@D@@0@Z)
    ace_Capabilities.obj : error LNK2001: unresolved external symbol "public: unsigned long __thiscall ACE_Hash<class ACE_String_Base<char> >::operator()(class ACE_String_Base<char> const &)const " (??R?$ACE_Hash@V?$ACE_String_Base@D@@@@QBEKABV?$ACE_String_Base@D@@@Z)
    nafxcw.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argv
    nafxcw.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argc
    nafxcw.lib(filelist.obj) : error LNK2001: unresolved external symbol __mbctype
    nafxcw.lib(timecore.obj) : error LNK2001: unresolved external symbol __mbctype
    nafxcw.lib(apphelp.obj) : error LNK2001: unresolved external symbol __mbctype
    dllvc\acedll.dll : fatal error LNK1120: 5 unresolved externals
      

  16.   

    nafxcw是什么东东,怎么我没碰到过?你是不是环境变量里面缺省用的这个库?
      

  17.   

    你用了MFC呀,没注意,不好意思。
      

  18.   

    连接时应该指定 /MD 参数==> 看来用ACE的人不少啊,这实在是出乎我的意料
      

  19.   

    链接的时候可能还要再加上MFC的库吧,我的makefile都是不用MFC的release版本。
      

  20.   

    to  回复人: Semigod() ( ) 信誉:93  能否将编译好的各个lib(还有config.h)发给我一份,我这边只有ACE_Static没错,别的全都……[email protected]非常感谢
      

  21.   

    怎么感觉你的是 VB中的dll