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 odgicontext

pblocktraits(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.