Teigha即之前的DirectDWG,是ODA提供的SDK,功能挺豐富,在其官網(wǎng)上可以
免費(fèi)下載到TX_SDK_3.07.0.0。
對這個(gè)SDK中的例子做了些修改,使之能“正常”編譯運(yùn)行。
主要的修改:
DwgCommonLib\ExService\ExHostAppServices.cpp中增加:
class OdDbKey
{
public:
OdDbKey()
: m_Key(L"This is my key!")
{
}
OdString m_Key;
};
OdDbKey* OdDbHostAppServices2::key() const
{
return new OdDbKey();
}
修改的原因是因?yàn)镺DA沒有提供
OdDbHostAppServices2::key() 的實(shí)現(xiàn),出現(xiàn)鏈接錯(cuò)誤:
error LNK2001: external symbol not resolved ""private: virtual class OdDbKey * __thiscall OdDbHostAppServices2::key(void)const " (?key@OdDbHostAppServices2@@EBEPAVOdDbKey@@XZ)".
所以,上面的實(shí)現(xiàn)為山寨版本。如果你知道正確的
OdDbKey定義,那就用正確的吧。
代碼下載