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

linker problem with borland c++ builder 6...
linker problem with borland c++ builder 6...
hello all,
i get the following linker error when trying to build a test example:
"unresolved external odrxcreatemoduleobject_for_windgimodule(const odstring&) referenced from...."
did anybody experience this in their travels, and, if so, how did you go about resolving it?
thanks,
nuz
gs_wingdi.lib is missing
vladimir
thanks for the quick reply...
i figured that could have been the problem. i included it and got stuff about the coff omf records being different (borland vs. microsoft .lib files). so i used borland's coff2omf utility, but it created a very small file that did not seem to do the trick.
nuz
you mean - gs_wingdi.lib appeared to have been created by ms linker? (archiver, actually)
vladimir
i got that particular issue hammered out by simply building a .lib file in bcb with the source files used for the vc project, but still cannot make my test project work. i am simply trying to make a test example to draw a dxf chart to a canvas in borland c++ builder 6. the .lib file i create is about half the size of the one included for vc, but it fixes the unresolved external error. however, the following line of code:
odgsmoduleptr p_gs = odrxdynamiclinker()->loadmodule("wingdi.gs");
still return p_gs as null. i have registered all the module:
odrx_declare_static_module_entry_point(wingdimodul e);
?br /> odrx_begin_static_module_map()
?br /> odrx_define_static_appmodule(l"wingdi.gs", wingdimodule)
?br />
#ifndef _toolkit_in_dll_
odrx_init_static_module_map();
#endif
?br />
does anybody have a working sample for borland c++ builder 6.0 using wingdi?
thanks again,
nuz
fixed it. thanks. now it's throwing an exception at setupactivelayoutviews, but i'm sure i'll hammer that out eventually also. this is not an easy library to work with for sure. i think the documentation could be more thorough.
thanks,
nuz
i haven't been able to figure it out...
hello all,
the following line:
p_dev = oddbgsmanager::setupactivelayoutviews( p_dev, p_gi );
throws an exception. both p_dev and p_gi are not null and appear to be valid. any thoughts?
thanks,
nuz
what kind of exception? oderror? it's code, description?
sergey slezkin
hello again, sergey...
the error is an access violation (eaccessviolation at 0000000).
here is some code in a draw_chart function. the p_db is declared on the class constructor.
if (( p_db == null ) || ( h_wnd == null ) || !width || !height ) return;
w = width;
h = height;
odgsinitialize();
odgsmoduleptr p_gs = odrxdynamiclinker()->loadmodule("wingdi.gs");
if( p_gs.isnull()) return;
odgsdeviceptr p_dev = p_gs->createdevice();
if( p_dev.isnull()) return;
odrxdictionaryptr p_props = p_dev->properties();
p_props->putat( "windowhwnd", odrxvariantvalue(( long )h_wnd ));
p_dev = oddbgsmanager::setupactivelayoutviews( p_dev, p_gi );
odgsdcrect screen_rect( odgsdcpoint( 0, 0 ), odgsdcpoint( w, h ));
p_dev->onsize( screen_rect );
odgsuninitialize();
//p_dev->update();
nuz
i assume odinitialize() was called.
was database set to p_gi?
btw, you can consult with odvectorize sample.
sergey slezkin
hi sergey,
yes, odinitialize is being called in the constructor. here is the rest of the code:
c_od_dwg::c_od_dwg()
{
#ifndef _toolkit_in_dll_
odrx_init_static_module_map();
#endif
p_db = null;
w = h = 0;
odinitialize( &p_svcs );
}
c_od_dwg::~c_od_dwg()
{
p_db = null;
oduninitialize();
}
bool c_od_dwg::load_chart( char *fn )
{
try
{
p_db = p_svcs.readfile( fn, false, false, oda::ksharedenyno );
}
catch ( const oderror& ex )
{
p_db = null;
return false;
}
p_gi = odgicontextfordbdatabase::createobject();
p_gi->setdatabase( p_db );
p_gi->enablegsmodel( true );
return true;
}
what has to happen for setactiveview to bellyache like that? it's obviously something bad going in. would it do that with a bad hwnd, or missing hdc? where are the properties defined in the documentation so we know exactly what the device needs?
thanks again...
nuz
last edited by nuzzi@hypack.com; 11th september 2007 at 11:43 amfff">.
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
回复


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

高级搜索
显示模式

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

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

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】dimentions problem in import export using dwgdirec yang686526 DirectDWG 0 2009-05-04 07:43 PM
【转帖】color conversion problem dd 1.14.01 yang686526 DirectDWG 0 2009-05-04 05:53 PM
【转帖】cannot open a dwg file in autocad - random problem yang686526 DirectDWG 0 2009-05-04 05:28 PM
【转帖】请问arx是否支持c++builder? yang686526 ObjectARX(C++) 0 2009-04-18 09:10 PM
【转帖】vista and addin dll problem yang686526 SolidWorks二次开发 0 2009-04-13 03:19 PM


所有的时间均为北京时间。 现在的时间是 04:45 AM.


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