cant link dll with 1.1.13 - gives unresolved error
cant link dll with 1.1.13 - gives unresolved error
i have a couple projects which create exe files, these i can link ok
however one project which makes a dll fails with the following
odfilebuf.obj : error lnk2019: unresolved external symbol "public: wchar_t * __thiscall odwstring::getbuffersetlength(int)" (?getbuffersetlength@odwstring@@qaepa_wh@z) referenced in function "class odwstring __cdecl odstringtowidechar(char const *,unsigned int)" (?odstringtowidechar@@ya?avodwstring@@pbdi@z)
the call is in odfilebuf.cpp->line 55
winxp, vc++ 7.1, statically linking c runtime in
any ideas?
this function is defined in dd_root module.
is this the only unresolved external?
vladimir
thanks for the reply
yes, thats the only one - strange isnt it?
the other pieces of the odwstring class seem to resolve.
i was thinking it might be caused by one of a few things
i am linking a dll which uses mfc, not an exe which uses mfc
the dll statically links the mfc runtime rather
than use the mfc runtime dll
i am linking in vc2003md\dd_vc2003md_root.lib (along with several others)
thanks again - i think i have solved it - and, even more amazing, i did it by re reading the documantation!
faq: i get link errors of the form 'undefined symbol '"public: class odwstring const & __thiscall odwstring

erator=(wchar_t const *)"
answer: you have the (/zc:wchar_t) compiler option set. this causes wchar_t to be defined as its own type, and since we are not building our libs with this option, the linker is treating wchar_t (from your app) as a separate type from the one used to compile our libs internally (there it is defined as unsigned short). if you remove this option from your language settings, the error will go away.