几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量  


返回   几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 » 仿射空间:CAX软件开发(三)二次开发与程序设计 » CAD二次开发 » AutoCAD二次开发 » DirectDWG
用户名
密码
注册 帮助 会员 日历 银行 搜索 今日新帖 标记论坛为已读


 
 
主题工具 搜索本主题 显示模式
旧 2009-05-07, 06:38 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】vs 2005 And 1.14.01

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 odbasefilebufen(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?
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
 


主题工具 搜索本主题
搜索本主题:

高级搜索
显示模式

发帖规则
不可以发表新主题
不可以回复主题
不可以上传附件
不可以编辑您的帖子

vB 代码开启
[IMG]代码开启
HTML代码关闭



所有的时间均为北京时间。 现在的时间是 06:10 PM.


于2004年创办,几何尺寸与公差论坛"致力于产品几何量公差标准GD&T | GPS研究/CAD设计/CAM加工/CMM测量"。免责声明:论坛严禁发布色情反动言论及有关违反国家法律法规内容!情节严重者提供其IP,并配合相关部门进行严厉查处,若內容有涉及侵权,请立即联系我们QQ:44671734。注:此论坛须管理员验证方可发帖。
沪ICP备06057009号-2
更多