linker error
linker error
hello,
i am working on a program that needs to be switched from opendwg to dwgdirect. i am trying to build a small application to familiarize myself with dwgdirect before starting work on the other project by i get some linker errors. i guess i am not including some .lib file - i have tried including all the libs that were included in the singledoc example but it doesn't work. the errors i get are these:
code:
link : warning lnk4199: /delayload

leacc.dll ignored; no imports found from oleacc.dll
exhostappservices.obj : error lnk2019: unresolved external symbol __imp__regenumvaluea@32 referenced in function "public: virtual bool __thiscall exhostappservices::ttffilenamebydescriptor(class odttfdescriptor const &,class odstring &)" (?ttffilenamebydescriptor@exhostappservices@@uae_nabvodttfdescriptor@@aavodstring@@@z)
dd_vc2003md_gi.lib(odtruetypefont.obj) : error lnk2001: unresolved external symbol __imp__regenumvaluea@32
exhostappservices.obj : error lnk2019: unresolved external symbol __imp__regclosekey@4 referenced in function "public: virtual bool __thiscall exhostappservices::ttffilenamebydescriptor(class odttfdescriptor const &,class odstring &)" (?ttffilenamebydescriptor@exhostappservices@@uae_nabvodttfdescriptor@@aavodstring@@@z)
dd_vc2003md_gi.lib(odtruetypefont.obj) : error lnk2001: unresolved external symbol __imp__regclosekey@4
exhostappservices.obj : error lnk2019: unresolved external symbol __imp__regqueryvalueexa@24 referenced in function "public: virtual bool __thiscall exhostappservices::ttffilenamebydescriptor(class odttfdescriptor const &,class odstring &)" (?ttffilenamebydescriptor@exhostappservices@@uae_nabvodttfdescriptor@@aavodstring@@@z)
exhostappservices.obj : error lnk2019: unresolved external symbol __imp__regopenkeyexa@20 referenced in function "public: virtual bool __thiscall exhostappservices::ttffilenamebydescriptor(class odttfdescriptor const &,class odstring &)" (?ttffilenamebydescriptor@exhostappservices@@uae_nabvodttfdescriptor@@aavodstring@@@z)
dd_vc2003md_gi.lib(odtruetypefont.obj) : error lnk2001: unresolved external symbol __imp__regopenkeyexa@20
dd_vc2003md_root.lib(rxinit.obj) : error lnk2019: unresolved external symbol __imp__cotaskmemfree@4 referenced in function "public: virtual class odstring __thiscall odrxsystemservices::createguid(void)" (?createguid@odrxsystemservices@@uae?avodstring@@xz)
dd_vc2003md_root.lib(rxinit.obj) : error lnk2019: unresolved external symbol __imp__stringfromclsid@8 referenced in function "public: virtual class odstring __thiscall odrxsystemservices::createguid(void)" (?createguid@odrxsystemservices@@uae?avodstring@@xz)
dd_vc2003md_root.lib(rxinit.obj) : error lnk2019: unresolved external symbol __imp__cocreateguid@4 referenced in function "public: virtual class odstring __thiscall odrxsystemservices::createguid(void)" (?createguid@odrxsystemservices@@uae?avodstring@@xz)
dd_vc2003md_root.lib(cmentitycolor.obj) : error lnk2019: unresolved external symbol __imp__deleteobject@4 referenced in function "public: __thiscall odpalette::~odpalette(void)" (??1odpalette@@qae@xz)
dd_vc2003md_gi.lib(odtruetypefont.obj) : error lnk2001: unresolved external symbol __imp__deleteobject@4
dd_vc2003md_root.lib(cmentitycolor.obj) : error lnk2019: unresolved external symbol __imp__getnearestpaletteindex@8 referenced in function "public: int __thiscall odpalette::lookupindex(unsigned long)" (?lookupindex@odpalette@@qaehk@z)
dd_vc2003md_root.lib(cmentitycolor.obj) : error lnk2019: unresolved external symbol __imp__createpalette@4 referenced in function "public: int __thiscall odpalette::lookupindex(unsigned long)" (?lookupindex@odpalette@@qaehk@z)
msvcrt.lib(crtexew.obj) : error lnk2019: unresolved external symbol _winmain@16 referenced in function _winmaincrtstartup
dd_vc2003md_gi.lib(odtruetypefont.obj) : error lnk2019: unresolved external symbol __imp__getglyphoutlinea@28 referenced in function "int __stdcall effexamineproc(struct tagenumlogfonta *,struct tagnewtextmetrica *,long,long)" (?effexamineproc@@yghpautagenumlogfonta@@pautagnewtextmetrica@@jj@z)
dd_vc2003md_gi.lib(odtruetypefont.obj) : error lnk2019: unresolved external symbol __imp__getglyphoutlinew@28 referenced in function "int __stdcall effexamineproc(struct tagenumlogfonta *,struct tagnewtextmetrica *,long,long)" (?effexamineproc@@yghpautagenumlogfonta@@pautagnewtextmetrica@@jj@z)
dd_vc2003md_gi.lib(odtruetypefont.obj) : error lnk2019: unresolved external symbol __imp__gettextmetricsa@8 referenced in function "int __stdcall effexamineproc(struct tagenumlogfonta *,struct tagnewtextmetrica *,long,long)" (?effexamineproc@@yghpautagenumlogfonta@@pautagnewtextmetrica@@jj@z)
dd_vc2003md_gi.lib(odtruetypefont.obj) : error lnk2019: unresolved external symbol __imp__selectobject@8 referenced in function "int __stdcall effexamineproc(struct tagenumlogfonta *,struct tagnewtextmetrica *,long,long)" (?effexamineproc@@yghpautagenumlogfonta@@pautagnewtextmetrica@@jj@z)
dd_vc2003md_gi.lib(odtruetypefont.obj) : error lnk2019: unresolved external symbol __imp__createfontindirecta@4 referenced in function "int __stdcall effexamineproc(struct tagenumlogfonta *,struct tagnewtextmetrica *,long,long)" (?effexamineproc@@yghpautagenumlogfonta@@pautagnewtextmetrica@@jj@z)
dd_vc2003md_gi.lib(odtruetypefont.obj) : error lnk2019: unresolved external symbol __imp__getfontdata@20 referenced in function "public: virtual unsigned long __thiscall odtruetypefont::getfontdata(unsigned long,unsigned long,void *,unsigned long)const " (?getfontdata@odtruetypefont@@ubekkkpaxk@z)
dd_vc2003md_gi.lib(odtruetypefont.obj) : error lnk2019: unresolved external symbol __imp__getcharacterplacementw@24 referenced in function "public: void __thiscall odtruetypefont::getglyhpindexes(class odarray<unsigned short,class odobjectsallocator<unsigned short> > const &,class odarray<unsigned short,class odobjectsallocator<unsigned short> > &)" (?getglyhpindexes@odtruetypefont@@qaexabv?$odarray@gv?$odobjectsallocator@g@@@@aav2@@z)
dd_vc2003md_gi.lib(odtruetypefont.obj) : error lnk2019: unresolved external symbol __imp__deletedc@4 referenced in function "public: __thiscall odttffontdata::~odttffontdata(void)" (??1odttffontdata@@qae@xz)
dd_vc2003md_gi.lib(odtruetypefont.obj) : error lnk2019: unresolved external symbol __imp__getfontlanguageinfo@4 referenced in function "public: virtual enum odresult __thiscall odtruetypefont::initialize(char const *,class odttfdescriptor const &)" (?initialize@odtruetypefont@@uae?aw4odresult@@pbdabvodttfdescriptor@@@z)
dd_vc2003md_gi.lib(odtruetypefont.obj) : error lnk2019: unresolved external symbol __imp__enumfontfamiliesexa@20 referenced in function "public: virtual enum odresult __thiscall odtruetypefont::initialize(char const *,class odttfdescriptor const &)" (?initialize@odtruetypefont@@uae?aw4odresult@@pbdabvodttfdescriptor@@@z)
dd_vc2003md_gi.lib(odtruetypefont.obj) : error lnk2019: unresolved external symbol __imp__setmapmode@8 referenced in function "public: virtual enum odresult __thiscall odtruetypefont::initialize(char const *,class odttfdescriptor const &)" (?initialize@odtruetypefont@@uae?aw4odresult@@pbdabvodttfdescriptor@@@z)
dd_vc2003md_gi.lib(odtruetypefont.obj) : error lnk2019: unresolved external symbol __imp__createcompatibledc@4 referenced in function "public: virtual enum odresult __thiscall odtruetypefont::initialize(char const *,class odttfdescriptor const &)" (?initialize@odtruetypefont@@uae?aw4odresult@@pbdabvodttfdescriptor@@@z)
any help would be greatly appreciated. also, is there any documentation that explains what does each library do?
thank you.
it seems something is wrong with _toolkit_in_dll_ macro.
if you're using dll version of dwgdirect, you must define it in your project settings.
if you're using lib version of dwgdirect, you mustn't define it.
sincerely yours,
george udov
thank you for your reply. i am using the lib version of dwgdirect. so far i have only added the lib files to the project and have included some headers (i copied those from odreadex) and tried to compile the project but i got those errors. i have not defined the _toolkit_in_dll_ macro.
you need to link gdi32.lib, ole32.lib and advapi32.lib
vladimir
that did it! thank you!
where are these libraries found?
i'm getting similar linking errors, but i'm using the vc8 libraries. where are these three libraries found? or is my problem related to the version of libraries i'm using. (using visual studio 2005)
thank you
paul