查看单个帖子
旧 2009-05-06, 10:51 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】problem linking

problem linking
problem linking
i have a link error with those functions in dbsymutl.h:
code:
const oddbobjectid& textstylestandardid(oddbdatabase* pdb);
const oddbobjectid& dimstylestandardid(oddbdatabase* pdb);
const oddbobjectid mlinestylestandardid(oddbdatabase* pdb);
the link error (unresolved external symbol) appears only in dll application (odamfcappdll).
i think that you forgot toolkit_export...
those functions are very usefull, could you do something for me, please ??
you are right. toolkit_export is missing. we'll fix it in next release/update. for now you can insert into your code:
code:
oddbobjectid mlinestylestandardid(oddbdatabase* pdb)
{
oddbdictionaryptr pdic = pdb->getmlstyledictionaryid().safeopenobject();
return pdic->getat(oddbsymutil::mlinestylestandardname());
}
oddbobjectid oddbsymutil::textstylestandardid(oddbdatabase* pdb)
{
oddbtextstyletableptr ptbl = pdb->gettextstyletableid().openobject();
return ptbl->getat(oddbsymutil::textstylestandardname());
}
oddbobjectid oddbsymutil::dimstylestandardid(oddbdatabase* pdb)
{
oddbdimstyletableptr ptbl = pdb->getdimstyletableid().openobject();
return ptbl->getat(oddbsymutil::dimstylestandardname(pdb->getmeasurement()));
}
sergey slezkin
thanks sergey !
in 1.11.1 we could do use copyfrom between two objects of different database,now we have an exception (wrongdatabase).
is there an other for copying two objects ?
copyfrom() should not be used for objects in different databases. else an object residing in one database will reference objects from another database.
oddbdatabase::wblockcloneobjects() will copy a set of objects to another database and take care about references.
sergey slezkin
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)