几何尺寸与公差论坛------致力于产品几何量公差标准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-05, 09:54 AM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】example programs

example programs
example programs
i have downloaded the directdwg library (2002 & 2003) as well as the sample programs. i have not however been able to successfully compile any of the programs under visualstudio .net (2003).
could someone post a step by step guide on how to compile the odreadex example. including the configuration of the visual studio project.
thank you in advance.
claudio
if you've unzipped both the non-libs and the binaries into the same folder (tree), then you *should* be able to open the dsp with vc .net and it will ask you to convert.
example programs
i have expanded the archives as you suggested and then imported the project from the directory, i am stil getting the following errors.
dd_vc6md_db.lib(odtoolkit.obj) : error lnk2005: "public: __thiscall oddbhostappservices:ddbhostappservices(void)" (??0oddbhostappservices@@qae@xz) already defined in exhostappservices.obj
link : warning lnk4098: defaultlib 'msvcrt' conflicts with use of other libs; use /nodefaultlib:library
exhostappservices.obj : error lnk2001: unresolved external symbol "public: virtual bool __thiscall oddbhostappservices::getpassword(class odstring const &,bool,class odbinarydata &)" (?getpassword@oddbhostappservices@@uae_nabvodstrin g@@_naavodbinarydata@@@z)
odreadex.obj : error lnk2001: unresolved external symbol "public: virtual bool __thiscall oddbhostappservices::getpassword(class odstring const &,bool,class odbinarydata &)" (?getpassword@oddbhostappservices@@uae_nabvodstrin g@@_naavodbinarydata@@@z)
exhostappservices.obj : error lnk2001: unresolved external symbol "public: virtual bool __thiscall oddbhostappservices::encryptdata(class odbinarydata &,class odsecurityparams const *)" (?encryptdata@oddbhostappservices@@uae_naavodbinar ydata@@pbvodsecurityparams@@@z)
odreadex.obj : error lnk2001: unresolved external symbol "public: virtual bool __thiscall oddbhostappservices::encryptdata(class odbinarydata &,class odsecurityparams const *)" (?encryptdata@oddbhostappservices@@uae_naavodbinar ydata@@pbvodsecurityparams@@@z)
exhostappservices.obj : error lnk2001: unresolved external symbol "public: virtual bool __thiscall oddbhostappservices::decryptdata(class odbinarydata &,class odsecurityparams const *)" (?decryptdata@oddbhostappservices@@uae_naavodbinar ydata@@pbvodsecurityparams@@@z)
odreadex.obj : error lnk2001: unresolved external symbol "public: virtual bool __thiscall oddbhostappservices::decryptdata(class odbinarydata &,class odsecurityparams const *)" (?decryptdata@oddbhostappservices@@uae_naavodbinar ydata@@pbvodsecurityparams@@@z)
exhostappservices.obj : error lnk2001: unresolved external symbol "public: virtual class odsmartptr<class oddbdatabase> __thiscall oddbhostappservices::readfile(class odstreambuf *,bool,bool)" (?readfile@oddbhostappservices@@uae?av?$odsmartptr @voddbdatabase@@@@pavodstreambuf@@_n1@z)
odreadex.obj : error lnk2019: unresolved external symbol "public: virtual class odsmartptr<class oddbdatabase> __thiscall oddbhostappservices::readfile(class odstreambuf *,bool,bool)" (?readfile@oddbhostappservices@@uae?av?$odsmartptr @voddbdatabase@@@@pavodstreambuf@@_n1@z) referenced in function _main
exhostappservices.obj : error lnk2019: unresolved external symbol "public: class odstring __thiscall oddbhostappservices::geterrordescription(unsigned int)" (?geterrordescription@oddbhostappservices@@qae?avo dstring@@i@z) referenced in function "public: virtual void __thiscall oddbhostappservices::warning(enum odresult)" (?warning@oddbhostappservices@@uaexw4odresult@@@z)
odreadex.obj : error lnk2001: unresolved external symbol "public: class odstring __thiscall oddbhostappservices::geterrordescription(unsigned int)" (?geterrordescription@oddbhostappservices@@qae?avo dstring@@i@z)
exprotocolextension.obj : error lnk2001: unresolved external symbol "private: virtual void __thiscall odgicontextpblocktraits(class oddbblocktraits const *)" (?popblocktraits@odgicontext@@eaexpbvoddbblocktrai ts@@@z)
exprotocolextension.obj : error lnk2001: unresolved external symbol "private: virtual class oddbblocktraits const * __thiscall odgicontext:ushblocktraits(class oddbblocktraits *)" (?pushblocktraits@odgicontext@@eaepbvoddbblocktrai ts@@pav2@@z)
exprotocolextension.obj : error lnk2001: unresolved external symbol "public: virtual double __thiscall odgicontext::lineweightscalemultiplier(void)const " (?lineweightscalemultiplier@odgicontext@@ubenxz)
exprotocolextension.obj : error lnk2001: unresolved external symbol "public: virtual double __thiscall odgicontext::linetypescalemultiplier(void)const " (?linetypescalemultiplier@odgicontext@@ubenxz)
exprotocolextension.obj : error lnk2001: unresolved external symbol "public: virtual bool __thiscall odgicontext::gettextstyle(class odgitextstyle &,class oddbstub *)" (?gettextstyle@odgicontext@@uae_naavodgitextstyle@ @pavoddbstub@@@z)
exprotocolextension.obj : error lnk2001: unresolved external symbol "public: virtual void __thiscall odgicontext::effectivetraits(class odgisubentitytraitsdata &)const " (?effectivetraits@odgicontext@@ubexaavodgisubentit ytraitsdata@@@z)
exprotocolextension.obj : error lnk2001: unresolved external symbol "public: virtual class oddbdatabase * __thiscall odgicontext::hostdatabase(void)const " (?hostdatabase@odgicontext@@ubepavoddbdatabase@@xz )
dd_vc6md_acis.lib(satparser.obj) : error lnk2019: unresolved external symbol "__declspec(dllimport) protected: void __thiscall std::basic_filebuf<char,struct std::char_traits<char> >::_initcvt(void)" (__imp_?_initcvt@?$basic_filebuf@du?$char_traits@d @std@@@std@@iaexxz) referenced in function "public: __thiscall satparser::satparser(struct parseparams const &)" (??0satparser@@qae@abuparseparams@@@z)
dd_vc6md_acis.lib(satparser.obj) : error lnk2019: unresolved external symbol "__declspec(dllimport) struct _iobuf * __cdecl std::__fiopen(char const *,int)" (__imp_?__fiopen@std@@yapau_iobuf@@pbdh@z) referenced in function "public: __thiscall satparser::satparser(struct parseparams const &)" (??0satparser@@qae@abuparseparams@@@z)
dd_vc6md_acis.lib(satparser.obj) : error lnk2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_ostream<char,struct std::char_traits<char> >::basic_ostream<char,struct std::char_traits<char> >(class std::basic_streambuf<char,struct std::char_traits<char> > *,bool,bool)" (__imp_??0?$basic_ostream@du?$char_traits@d@std@@@ std@@qae@pav?$basic_streambuf@du?$char_traits@d@st d@@@1@_n1@z) referenced in function "public: enum parseoutcome __thiscall satparser:arse(void)" (?parse@satparser@@qae?aw4parseoutcome@@xz)
../../../../../exe/debug/odreadex.exe : fatal error lnk1120: 15 unresolved externals
i have no idea as i have included the library path in the project settings.
any help would be appreciated.
claudio corsi
after you convert the project files, you should change the linker settings to use the correct version of the dd libraries, for example dd_vc2003*.lib instead of dd_vc6*.lib.
we will be providing a set of .net 2003 sample projects as part of the next maintenance release.

external symbol
i downloaded the most recent nonlibs file and the number of unresolved symbols is greatly reduced
exprotocolextension.cpp
dbdumper.cpp
odfilebuf.cpp
exundocontroller.cpp
exsystemservices.cpp
exodstorage.cpp
exhostappservices.cpp
exgienhancedmetafile.cpp
linking...
dd_vc6md_acis.lib(satparser.obj) : error lnk2019: unresolved external symbol "__declspec(dllimport) protected: void __thiscall std::basic_filebuf<char,struct std::char_traits<char> >::_initcvt(void)" (__imp_?_initcvt@?$basic_filebuf@du?$char_traits@d @std@@@std@@iaexxz) referenced in function "public: __thiscall satparser::satparser(struct parseparams const &)" (??0satparser@@qae@abuparseparams@@@z)
dd_vc6md_acis.lib(satparser.obj) : error lnk2019: unresolved external symbol "__declspec(dllimport) struct _iobuf * __cdecl std::__fiopen(char const *,int)" (__imp_?__fiopen@std@@yapau_iobuf@@pbdh@z) referenced in function "public: __thiscall satparser::satparser(struct parseparams const &)" (??0satparser@@qae@abuparseparams@@@z)
dd_vc6md_acis.lib(satparser.obj) : error lnk2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_ostream<char,struct std::char_traits<char> >::basic_ostream<char,struct std::char_traits<char> >(class std::basic_streambuf<char,struct std::char_traits<char> > *,bool,bool)" (__imp_??0?$basic_ostream@du?$char_traits@d@std@@@ std@@qae@pav?$basic_streambuf@du?$char_traits@d@st d@@@1@_n1@z) referenced in function "public: enum parseoutcome __thiscall satparser:arse(void)" (?parse@satparser@@qae?aw4parseoutcome@@xz)
../../../../../exe/debug/odreadex.exe : fatal error lnk1120: 3 unresolved externals
however i still can not compile - for some reason it is still looking for the vc6 libraries even though i have changed the linker settings to point to the vc2002 directory
any help would be appreciated
claudio
you've missed changing the library sections libs to the correct libraries. i've attached the 2002 version of the make file for you.
attached files (1.5 kb, 31 views)

try this; it works for vc.net 2002, and should work for vc.net 2003.
in order to build an example program, you have to open the corresponding project file from the dwgdirect\projectfiles\win32\msvc6\examples folder
unfortunately, the vc6 project files reference the vc6 libraries, and not the vc2003 libraries you need to reference.
i抳e found the easiest way to do this is before opening the vc6 project files.
open the desired .dsp project file with notepad
using case matching,
search and replace d\\ with \\
search and replace /vc6/ with /vc2003/
search and replace vc6 with vc2003
launch your compiler, and open the project file.
you抣l be asked if you want to convert it to visual c++ 7.0 project format. answer yes
change your the working directory on the debugging settings for the debug configuration property page to ../../../../../exe/debug
change your the working directory on the debugging settings for the release configuration property page to ../../../../../exe/release
change your command arguments as required.
that did it for me.
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
回复


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

高级搜索
显示模式

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

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

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】running solidworks swp file from other programs yang686526 SolidWorks二次开发 0 2009-04-13 02:01 PM
i am using ver 3.7.but i have some programs made in cad++(ver 3.5). when i import and huangyhg PC-DMIS 0 2009-04-06 10:47 PM


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


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