2013-05-16 4 views
0

Я пытаюсь связать пустой проект с библиотекой PoDoFo (.lib), библиотека построена с использованием проекта VS с помощью Многопоточная DLL-библиотека отладки (/ MDd) комплект. Пока я пытаюсь связать с этим Lib в другом проекте, независимо от того, что генерации кода вариант я использую с этим .lib, я получаю это:Ссылка на ошибку при связывании с многопоточной библиотекой DLL Debug

1>Linking... 
1>libcmtd.lib(dbgheap.obj) : error LNK2005: __heap_alloc already defined in LIBCMT.lib(malloc.obj) 
1>libcmtd.lib(dbgheap.obj) : error LNK2005: __recalloc already defined in LIBCMT.lib(recalloc.obj) 
1>libcmtd.lib(dbgheap.obj) : error LNK2005: __msize already defined in LIBCMT.lib(msize.obj) 
1>libcmtd.lib(malloc.obj) : error LNK2005: _V6_HeapAlloc already defined in LIBCMT.lib(malloc.obj) 
1>libcmtd.lib(dbghook.obj) : error LNK2005: __crt_debugger_hook already defined in LIBCMT.lib(dbghook.obj) 
1>libcmtd.lib(sbheap.obj) : error LNK2005: __get_sbh_threshold already defined in LIBCMT.lib(sbheap.obj) 
1>libcmtd.lib(sbheap.obj) : error LNK2005: __set_sbh_threshold already defined in LIBCMT.lib(sbheap.obj) 
1>libcmtd.lib(sbheap.obj) : error LNK2005: __set_amblksiz already defined in LIBCMT.lib(sbheap.obj) 
1>libcmtd.lib(sbheap.obj) : error LNK2005: __get_amblksiz already defined in LIBCMT.lib(sbheap.obj) 
1>libcmtd.lib(sbheap.obj) : error LNK2005: ___sbh_heap_init already defined in LIBCMT.lib(sbheap.obj) 
1>libcmtd.lib(sbheap.obj) : error LNK2005: ___sbh_find_block already defined in LIBCMT.lib(sbheap.obj) 
1>libcmtd.lib(sbheap.obj) : error LNK2005: ___sbh_free_block already defined in LIBCMT.lib(sbheap.obj) 
1>libcmtd.lib(sbheap.obj) : error LNK2005: ___sbh_alloc_block already defined in LIBCMT.lib(sbheap.obj) 
1>libcmtd.lib(sbheap.obj) : error LNK2005: ___sbh_alloc_new_region already defined in LIBCMT.lib(sbheap.obj) 
1>libcmtd.lib(sbheap.obj) : error LNK2005: ___sbh_alloc_new_group already defined in LIBCMT.lib(sbheap.obj) 
1>libcmtd.lib(sbheap.obj) : error LNK2005: ___sbh_resize_block already defined in LIBCMT.lib(sbheap.obj) 
1>libcmtd.lib(sbheap.obj) : error LNK2005: ___sbh_heapmin already defined in LIBCMT.lib(sbheap.obj) 
1>libcmtd.lib(sbheap.obj) : error LNK2005: ___sbh_heap_check already defined in LIBCMT.lib(sbheap.obj) 
1>libcmtd.lib(sbheap.obj) : error LNK2005: ___sbh_pHeaderDefer already defined in LIBCMT.lib(sbheap.obj) 
1>libcmtd.lib(isctype.obj) : error LNK2005: __isctype_l already defined in LIBCMT.lib(isctype.obj) 
1>libcmtd.lib(isctype.obj) : error LNK2005: __isctype already defined in LIBCMT.lib(isctype.obj) 
1>msvcrtd.lib(ti_inst.obj) : error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" ([email protected]@[email protected]@@Z) already defined in LIBCMT.lib(typinfo.obj) 
1>msvcrtd.lib(ti_inst.obj) : error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" ([email protected]@[email protected]@@Z) already defined in LIBCMT.lib(typinfo.obj) 
1>msvcrtd.lib(MSVCR90D.dll) : error LNK2005: __invalid_parameter already defined in LIBCMT.lib(invarg.obj) 
1>msvcrtd.lib(MSVCR90D.dll) : error LNK2005: __CrtDbgReportW already defined in libcmtd.lib(dbgrptw.obj) 
1>msvcrtd.lib(MSVCR90D.dll) : error LNK2005: "public: virtual __thiscall std::exception::~exception(void)" ([email protected]@@[email protected]) already defined in LIBCMT.lib(stdexcpt.obj) 
1>msvcrtd.lib(MSVCR90D.dll) : error LNK2005: "public: __thiscall std::exception::exception(void)" ([email protected]@@[email protected]) already defined in LIBCMT.lib(stdexcpt.obj) 
1>msvcrtd.lib(MSVCR90D.dll) : error LNK2005: "public: __thiscall std::exception::exception(class std::exception const &)" ([email protected]@@[email protected]@@Z) already defined in LIBCMT.lib(stdexcpt.obj) 
1>msvcrtd.lib(MSVCR90D.dll) : error LNK2005: "public: __thiscall std::exception::exception(char const * const &)" ([email protected]@@[email protected]@Z) already defined in LIBCMT.lib(stdexcpt.obj) 
1>msvcrtd.lib(MSVCR90D.dll) : error LNK2005: ___iob_func already defined in libcmtd.lib(_file.obj) 
1>msvcrtd.lib(MSVCR90D.dll) : error LNK2005: _free already defined in LIBCMT.lib(free.obj) 
1>msvcrtd.lib(MSVCR90D.dll) : error LNK2005: _malloc already defined in LIBCMT.lib(malloc.obj) 
1>msvcrtd.lib(MSVCR90D.dll) : error LNK2005: _realloc already defined in LIBCMT.lib(realloc.obj) 
1>msvcrtd.lib(MSVCR90D.dll) : error LNK2005: _wcstombs already defined in libcmtd.lib(wcstombs.obj) 
1>msvcrtd.lib(MSVCR90D.dll) : error LNK2005: _wcslen already defined in LIBCMT.lib(wcslen.obj) 
1>msvcrtd.lib(MSVCR90D.dll) : error LNK2005: _strtol already defined in LIBCMT.lib(strtol.obj) 
1>msvcrtd.lib(MSVCR90D.dll) : error LNK2005: _isdigit already defined in LIBCMT.lib(_ctype.obj) 
1>msvcrtd.lib(MSVCR90D.dll) : error LNK2005: _strncmp already defined in LIBCMT.lib(strncmp.obj) 
1>msvcrtd.lib(MSVCR90D.dll) : error LNK2005: _fopen already defined in libcmtd.lib(fopen.obj) 
1>msvcrtd.lib(MSVCR90D.dll) : error LNK2005: _fclose already defined in libcmtd.lib(fclose.obj) 
1>msvcrtd.lib(MSVCR90D.dll) : error LNK2005: _fread already defined in libcmtd.lib(fread.obj) 
1>msvcrtd.lib(MSVCR90D.dll) : error LNK2005: _fseek already defined in libcmtd.lib(fseek.obj) 
1>msvcrtd.lib(MSVCR90D.dll) : error LNK2005: _ftell already defined in libcmtd.lib(ftell.obj) 
1>msvcrtd.lib(MSVCR90D.dll) : error LNK2005: __vscprintf already defined in libcmtd.lib(vsprintf.obj) 
1>msvcrtd.lib(MSVCR90D.dll) : error LNK2005: _fflush already defined in libcmtd.lib(fflush.obj) 
1>msvcrtd.lib(MSVCR90D.dll) : error LNK2005: __strnicmp already defined in LIBCMT.lib(strnicmp.obj) 
1>msvcrtd.lib(MSVCR90D.dll) : error LNK2005: _sprintf already defined in libcmtd.lib(sprintf.obj) 
1>msvcrtd.lib(MSVCR90D.dll) : error LNK2005: _memmove already defined in LIBCMT.lib(memmove.obj) 
1>msvcrtd.lib(MSVCR90D.dll) : error LNK2005: _strftime already defined in LIBCMT.lib(strftime.obj) 
1>msvcrtd.lib(MSVCR90D.dll) : error LNK2005: ___timezone already defined in LIBCMT.lib(timeset.obj) 
1>msvcrtd.lib(MSVCR90D.dll) : error LNK2005: __tzset already defined in LIBCMT.lib(tzset.obj) 
1>msvcrtd.lib(MSVCR90D.dll) : error LNK2005: _exit already defined in LIBCMT.lib(crt0dat.obj) 
1>msvcrtd.lib(MSVCR90D.dll) : error LNK2005: _isspace already defined in LIBCMT.lib(_ctype.obj) 
1>msvcrtd.lib(MSVCR90D.dll) : error LNK2005: _getenv already defined in LIBCMT.lib(getenv.obj) 
1>msvcrtd.lib(MSVCR90D.dll) : error LNK2005: __stricmp already defined in LIBCMT.lib(stricmp.obj) 
1>msvcrtd.lib(MSVCR90D.dll) : error LNK2005: _isxdigit already defined in LIBCMT.lib(_ctype.obj) 
1>msvcrtd.lib(MSVCR90D.dll) : error LNK2005: _strstr already defined in libcmtd.lib(strstr.obj) 
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: __thiscall std::allocator<char>::allocator<char>(void)" ([email protected]@[email protected]@[email protected]) already defined in TestPoDoFo.obj 
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: __thiscall std::allocator<char>::allocator<char>(class std::allocator<char> const &)" ([email protected]@[email protected]@[email protected]@@Z) already defined in TestPoDoFo.obj 

Если никакой пользы I» ве также отправил это:

/Od /I "..\Podofo.Include\\" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_UNICODE" /D "UNICODE" /Gm /EHsc /RTC1 /MTd /Yu"stdafx.h" /Fp"Debug\TestPoDoFo.pch" /Fo"Debug\\" /Fd"Debug\vc90.pdb" /W3 /nologo /c /ZI /TP /errorReport:prompt 

не следует тестовый проект (.exe), который связывает с .lib также Многопоточная Debug DLL (/ MDd) ??

ответ

1

В общем, все ваши проекты должны использовать многопоточную Debug DLL (/ MDD)

+0

Что я могу сказать ... Я пропустил один подпроект ..! Икс( – AlexandruC