![]() |
【转帖】link errors in odreadex on visual studio 2005
link errors in odreadex on visual studio 2005
link errors in odreadex on visual studio 2005 i downloaded dd_vc9.zip and found that there was something wrong with the project file: the following error has occurred during xml parsing: file: c:\zetek\dwgdirect\projectfiles\win32\msvc9\allexa mples.vcproj line: 9 column: 2 error message: '9,00' violates enumeration constraint of '7.00 7,00 7.10 7,10 8.00 8,00'. the attribute 'version' with value '9,00' failed to parse. the file 'c:\zetek\dwgdirect\projectfiles\win32\msvc9\allex amples.vcproj' has failed to load. i reverted to the projects defined in dd_vc8.zip and found that the notation for the "additional library directories" path in properties -> linker -> input was incorrect. a) it had a relative path which is no longer valid. b) the file names are wrong. the name format has changed. when i corrected the load path using my absolute path and changed the names of all the files from md to mt, i got the following error messages: 1>------ build started: project: odreadex, configuration: debug win32 ------ 1>linking... 1>msvcprtd.lib(msvcp80d.dll) : error lnk2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)" (??1?$basic_string@du?$char_traits@d@std@@v?$alloc ator@d@2@@std@@qae@xz) already defined in dd_vc8mt_db.lib(hatchpatternmanager.obj) 1>msvcprtd.lib(msvcp80d.dll) : error lnk2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)" (??0?$basic_string@du?$char_traits@d@std@@v?$alloc ator@d@2@@std@@qae@pbd@z) already defined in dd_vc8mt_db.lib(hatchpatternmanager.obj) 1>msvcprtd.lib(msvcp80d.dll) : error lnk2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0?$basic_string@du?$char_traits@d@std@@v?$alloc ator@d@2@@std@@qae@abv01@@z) already defined in dd_vc8mt_db.lib(hatchpatternmanager.obj) 1>msvcprtd.lib(msvcp80d.dll) : error lnk2005: "public: char const * __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::c_str(void)const " (?c_str@?$basic_string@du?$char_traits@d@std@@v?$a llocator@d@2@@std@@qbepbdxz) already defined in dd_vc8mt_db.lib(hatchpatternmanager.obj) 1>msvcprtd.lib(msvcp80d.dll) : error lnk2005: "public: static unsigned int __cdecl std::char_traits<char>::length(char const *)" (?length@?$char_traits@d@std@@saipbd@z) already defined in dd_vc8mt_db.lib(hatchpatternmanager.obj) 1>libcmt.lib(invarg.obj) : error lnk2005: __invoke_watson already defined in msvcrtd.lib(msvcr80d.dll) 1>libcmt.lib(invarg.obj) : error lnk2005: __invalid_parameter already defined in msvcrtd.lib(msvcr80d.dll) 1>libcmt.lib(setlocal.obj) : error lnk2005: __configthreadlocale already defined in msvcrtd.lib(msvcr80d.dll) 1>libcmt.lib(tidtable.obj) : error lnk2005: __encode_pointer already defined in msvcrtd.lib(msvcr80d.dll) 1>libcmt.lib(tidtable.obj) : error lnk2005: __decode_pointer already defined in msvcrtd.lib(msvcr80d.dll) 1>libcmt.lib(crt0dat.obj) : error lnk2005: __amsg_exit already defined in msvcrtd.lib(msvcr80d.dll) 1>libcmt.lib(crt0dat.obj) : error lnk2005: __initterm_e already defined in msvcrtd.lib(msvcr80d.dll) 1>libcmt.lib(crt0dat.obj) : error lnk2005: _exit already defined in msvcrtd.lib(msvcr80d.dll) 1>libcmt.lib(crt0dat.obj) : error lnk2005: __exit already defined in msvcrtd.lib(msvcr80d.dll) 1>libcmt.lib(crt0dat.obj) : error lnk2005: __cexit already defined in msvcrtd.lib(msvcr80d.dll) 1>libcmt.lib(lconv.obj) : error lnk2005: _localeconv already defined in msvcrtd.lib(msvcr80d.dll) 1>libcmt.lib(mlock.obj) : error lnk2005: __unlock already defined in msvcrtd.lib(msvcr80d.dll) 1>libcmt.lib(mlock.obj) : error lnk2005: __lock already defined in msvcrtd.lib(msvcr80d.dll) 1>libcmt.lib(winxfltr.obj) : error lnk2005: __xcptfilter already defined in msvcrtd.lib(msvcr80d.dll) 1>libcmt.lib(_wctype.obj) : error lnk2005: _iswlower already defined in msvcrtd.lib(msvcr80d.dll) 1>libcmt.lib(_wctype.obj) : error lnk2005: _iswdigit already defined in msvcrtd.lib(msvcr80d.dll) 1>libcmt.lib(_wctype.obj) : error lnk2005: _iswalnum already defined in msvcrtd.lib(msvcr80d.dll) 1>libcmt.lib(realloc.obj) : error lnk2005: _realloc already defined in msvcrtd.lib(msvcr80d.dll) 1>libcmt.lib(crt0init.obj) : error lnk2005: ___xi_a already defined in msvcrtd.lib(cinitexe.obj) 1>libcmt.lib(crt0init.obj) : error lnk2005: ___xi_z already defined in msvcrtd.lib(cinitexe.obj) 1>libcmt.lib(crt0init.obj) : error lnk2005: ___xc_a already defined in msvcrtd.lib(cinitexe.obj) 1>libcmt.lib(crt0init.obj) : error lnk2005: ___xc_z already defined in msvcrtd.lib(cinitexe.obj) 1>libcmt.lib(hooks.obj) : error lnk2005: "void __cdecl terminate(void)" (?terminate@@yaxxz) already defined in msvcrtd.lib(msvcr80d.dll) 1>libcmt.lib(atox.obj) : error lnk2005: _atoi already defined in msvcrtd.lib(msvcr80d.dll) 1>libcmt.lib(dosmap.obj) : error lnk2005: __errno already defined in msvcrtd.lib(msvcr80d.dll) 1>libcmt.lib(errmode.obj) : error lnk2005: ___set_app_type already defined in msvcrtd.lib(msvcr80d.dll) 1>libcmt.lib(getenv.obj) : error lnk2005: _getenv already defined in msvcrtd.lib(msvcr80d.dll) 1> creating library ../../../../../exe/vc8/debug/odreadex.lib and object ../../../../../exe/vc8/debug/odreadex.exp 1>link : warning lnk4098: defaultlib 'msvcrtd' conflicts with use of other libs; use /nodefaultlib:library 1>link : warning lnk4098: defaultlib 'libcmt' conflicts with use of other libs; use /nodefaultlib:library 1>libcmt.lib(crt0.obj) : error lnk2019: unresolved external symbol _main referenced in function ___tmaincrtstartup 1>../../../../../exe/vc8/debug/odreadex.exe : fatal error lnk1120: 1 unresolved externals 1>build log was saved at "file://c:\zetek\dwgdirect\out\vc8\odreadex_debug\buildlog .htm" 1>odreadex - 34 error(s), 2 warning(s) ========== build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== i built my own project with the odreadex source code and used the following vc9 libraries from lib\vc9md: dd_alloc_dll.lib dd_dbroot_dll.lib dd_db_dll.lib dd_ge_dll.lib dd_gi_dll.lib dd_gs_dll.lib dd_root_dll.lib i chose them because the executable of obreadex from your .zip file worked once i gave it those .dll files. everything compiled but i got these messages when the build failed: 1>compiling... 1>dbdumper.cpp 1>exdbcommandcontext.cpp 1>.\extensions\exservices\exdbcommandcontext.cpp(6 15): todo : implement pointtoorienttracker 1>exgirasterimage.cpp 1>exhostappservices.cpp 1>expagecontroller.cpp 1>exprotocolextension.cpp 1>exstringio.cpp 1>exsystemservices.cpp 1>extractmetadata.cpp 1>compiling password support for r18 drawings 1>exundocontroller.cpp 1>giworlddrawdumper.cpp 1>odfilebuf.cpp 1>stdafx.cpp 1>tostring.cpp 1>generating code... 1>linking... 1>dbdumper.obj : error lnk2001: unresolved external symbol "public: static class odstring const odstring::kempty" (?kempty@odstring@@2v1@b) 1>exdbcommandcontext.obj : error lnk2001: unresolved external symbol "public: static class odstring const odstring::kempty" (?kempty@odstring@@2v1@b) 1>exprotocolextension.obj : error lnk2001: unresolved external symbol "public: static class odstring const odstring::kempty" (?kempty@odstring@@2v1@b) 1>exprotocolextension.obj : error lnk2019: unresolved external symbol "public: static struct odarraybuffer odarraybuffer::g_empty_array_buffer" (?g_empty_array_buffer@odarraybuffer@@2u1@a) referenced in function "private: static void __cdecl oddbhatch_dumper::dumpedgestype(int,class odsmartptr<class oddbhatch> &,int)" (?dumpedgestype@oddbhatch_dumper@@caxhaav?$odsmart ptr@voddbhatch@@@@h@z) 1>exundocontroller.obj : error lnk2001: unresolved external symbol "public: static struct odarraybuffer odarraybuffer::g_empty_array_buffer" (?g_empty_array_buffer@odarraybuffer@@2u1@a) 1>giworlddrawdumper.obj : error lnk2001: unresolved external symbol "public: static struct odarraybuffer odarraybuffer::g_empty_array_buffer" (?g_empty_array_buffer@odarraybuffer@@2u1@a) 1>dbdumper.obj : error lnk2001: unresolved external symbol "public: static struct odarraybuffer odarraybuffer::g_empty_array_buffer" (?g_empty_array_buffer@odarraybuffer@@2u1@a) 1>exdbcommandcontext.obj : error lnk2001: unresolved external symbol "public: static struct odarraybuffer odarraybuffer::g_empty_array_buffer" (?g_empty_array_buffer@odarraybuffer@@2u1@a) 1>exgirasterimage.obj : error lnk2001: unresolved external symbol "public: static struct odarraybuffer odarraybuffer::g_empty_array_buffer" (?g_empty_array_buffer@odarraybuffer@@2u1@a) 1>expagecontroller.obj : error lnk2001: unresolved external symbol "public: static struct odarraybuffer odarraybuffer::g_empty_array_buffer" (?g_empty_array_buffer@odarraybuffer@@2u1@a) 1>exdbcommandcontext.obj : error lnk2001: unresolved external symbol "public: static class odgepoint3d const odgepoint3d::korigin" (?korigin@odgepoint3d@@2v1@b) 1>exhostappservices.obj : error lnk2001: unresolved external symbol "public: virtual class odstring __thiscall oddbhostappservices::findfile(class odstring const &,class oddbdatabase *,enum oddbhostappservices::findfilehint)" (?findfile@oddbhostappservices@@uae?avodstring@@ab v2@pavoddbdatabase@@w4findfilehint@1@@z) 1>extractmetadata.obj : error lnk2001: unresolved external symbol "public: virtual class odstring __thiscall oddbhostappservices::findfile(class odstring const &,class oddbdatabase *,enum oddbhostappservices::findfilehint)" (?findfile@oddbhostappservices@@uae?avodstring@@ab v2@pavoddbdatabase@@w4findfilehint@1@@z) 1>exhostappservices.obj : error lnk2001: unresolved external symbol "private: virtual class oddbkey * __thiscall oddbhostappservices2::key(void)const " (?key@oddbhostappservices2@@ebepavoddbkey@@xz) 1>extractmetadata.obj : error lnk2001: unresolved external symbol "private: virtual class oddbkey * __thiscall oddbhostappservices2::key(void)const " (?key@oddbhostappservices2@@ebepavoddbkey@@xz) 1>exprotocolextension.obj : error lnk2001: unresolved external symbol "public: static class odgeplane const odgeplane::kxyplane" (?kxyplane@odgeplane@@2v1@b) 1>exprotocolextension.obj : error lnk2001: unresolved external symbol "public: static class odgetol odgecontext::gtol" (?gtol@odgecontext@@2vodgetol@@a) 1>tostring.obj : error lnk2001: unresolved external symbol "public: static class odgetol odgecontext::gtol" (?gtol@odgecontext@@2vodgetol@@a) 1>exprotocolextension.obj : error lnk2001: unresolved external symbol "public: static class odgevector2d const odgevector2d::kxaxis" (?kxaxis@odgevector2d@@2v1@b) 1>exprotocolextension.obj : error lnk2001: unresolved external symbol "public: static class odgevector3d const odgevector3d::kxaxis" (?kxaxis@odgevector3d@@2v1@b) 1>exprotocolextension.obj : error lnk2001: unresolved external symbol "public: static class odgevector3d const odgevector3d::kzaxis" (?kzaxis@odgevector3d@@2v1@b) 1>extractmetadata.obj : error lnk2001: unresolved external symbol "class odrxmodule * __cdecl odrxcreatemoduleobject_for_odrecomputedimblockmodu le(class odstring const &)" (?odrxcreatemoduleobject_for_odrecomputedimblockmo dule@@yapavodrxmodule@@abvodstring@@@z) 1>extractmetadata.obj : error lnk2001: unresolved external symbol "class odrxmodule * __cdecl odrxcreatemoduleobject_for_modelermodule(class odstring const &)" (?odrxcreatemoduleobject_for_modelermodule@@yapavo drxmodule@@abvodstring@@@z) 1>c:\documents and settings\bill taylor.mud\my documents\visual studio 2005\projects\extractmetadata\debug\extractmetadat a.exe : fatal error lnk1120: 12 unresolved externals 1>build log was saved at "file://c:\documents and settings\bill taylor.mud\my documents\visual studio 2005\projects\extractmetadata\extractmetadata\debu g\buildlog.htm" 1>extractmetadata - 24 error(s), 0 warning(s) ========== build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== i do not know how to figure out which .dll has the classes i need. please help. thanks. |
所有的时间均为北京时间。 现在的时间是 06:03 AM. |