vs 2005 and 1.14.01
vs 2005 and 1.14.01
hello,
i'm trying to upgrade to visual studio 2005 and dwgdirect 1.14.01.
i get these error messages from the linker:
>>
odfilebuf.obj : error lnk2019: unresolved external symbol "__declspec(dllimport) public: wchar_t * __thiscall odwstring::getbuffersetlength(int)" (__imp_?getbuffersetlength@odwstring@@qaepa_wh@z) referenced in function "class odwstring __cdecl odstringtowidechar(char const *,unsigned int)" (?odstringtowidechar@@ya?avodwstring@@pbdi@z)
odfilebuf.obj : error lnk2019: unresolved external symbol "__declspec(dllimport) public: wchar_t const * __thiscall odwstring::c_str(void)const " (__imp_?c_str@odwstring@@qbepb_wxz) referenced in function "public: virtual void __thiscall odbasefilebuf

en(char const *,enum oda::filesharemode,enum oda::fileaccessmode,enum oda::filecreationdisposition)" (?open@odbasefilebuf@@uaexpbdw4filesharemode@oda@@ w4fileaccessmode@3@w4filecreationdisposition@3@@z)
winntcrypt.obj : error lnk2001: unresolved external symbol "__declspec(dllimport) public: wchar_t const * __thiscall odwstring::c_str(void)const " (__imp_?c_str@odwstring@@qbepb_wxz)
<<
any idears?
btw when i try to build the sample projects with vs 2005 i get a lot of error messages, too.
regards
dirk busch
are you using lib or dll version?
make sure that "treat wchar_t as built-in type" in properties/c++/language is turned off in your project.
to build examples you may use allexamples solution (to avoid linking problems):
projectfiles\win32\msvc8\allexamples.sln (lib version)
projectfiles\win32\msvc8\allexamplesdll.sln (dll version)
vladimir
quote:
originally posted by wvk
make sure that "treat wchar_t as built-in type" in properties/c++/language is turned off in your project.
thank you that does the trick :-)
regards
dirk busch
wchar_t should be built-in
i would prefer it if the libraries were compiled with wchar_t as a built-in type, since that is the c++ standard.
alternatively, may i recommend that the following line in odwstring.h:
code:
typedef wchar_t odcharw;
be changed to:
code:
#ifdef _native_wchar_t_defined
typedef unsigned short odcharw;
#else
typedef wchar_t odcharw;
#endif
so that people who need to compile with wchar_t built-in can do so.
libraries were not compiled with wchar_t as a built-in type, because it was not default in earlier vc versions, and those who upgrade their projects wil have problems with it. it was considered better to cause problems to new projects beginners.
as for your suggestion, it's not that simple. odwstring should expose wchar_t interface to minimize a number of type casts required. (or using it would be unnecessary hard). there is other solution possible - to add overloads for 'unsigned short' and 'wchar_t' to odwstring. i'll try this approach and perhaps include in the next update (if it will not require any changes in user code).
vladimir
ok
thanks for the clarification.
just in case you're wondering, the alteration that i posted works for me, and i suspect it should work for you too when compiling the sources. i believe what you have done in typedef'ing odcharw is the best thing to do.
regards,
ben
we vote for libraries compiled using wchar_t. would that just mean a bigger download?