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

unable to compile 1.11
unable to compile 1.11
hi
i have just downloaded and installed the 1.11 version of dwgdirect and am trying to get a skeleton mfc application to compile. it is using the /mt(d) switches and the following library files (release build):
shlwapi.lib
dd_vc6mt_root.lib
dd_vc6mt_db.lib
dd_vc6mt_gi.lib
dd_vc6mt_ge.lib
dd_vc6mt_gs.lib
dd_vc6mt_alloc.lib
dd_vc6mt_ole.lib
these are the files includes into the project:
exhostappservices.cpp
exsystemservices.cpp
exundocontroller.cpp
these are the header files included int he main app header file:
#include <shlwapi.h>
#include <odacommon.h>
#include <dbdatabase.h>
#include <objects.h>
#include <exsystemservices.h>
#include <exhostappservices.h>
#include <tables.h>
#include <entities.h>
class userbreak
{
};
class cseq2dwgapp : public cwinapp,
public exhostappservices,
public exsystemservices
{
protected:
using cwinapperator new;
using cwinapperator delete;
when i compile, i get these errors:
--------------------configuration: seq2dwg - win32 release--------------------
linking...
nafxcw.lib(afxmem.obj) : error lnk2005: "void * __cdecl operator new(unsigned int)" (??2@yapaxi@z) already defined in dd_vc6mt_alloc.lib(odalloc.obj)
nafxcw.lib(afxmem.obj) : error lnk2005: "void __cdecl operator delete(void *)" (??3@yaxpax@z) already defined in dd_vc6mt_alloc.lib(odalloc.obj)
exhostappservices.obj : error lnk2001: unresolved external symbol "public: virtual bool __thiscall oddbhostappservices::loadapp(class odstring const &)" (?loadapp@oddbhostappservices@@uae_nabvodstring@@@ z)
seq2dwg.obj : error lnk2001: unresolved external symbol "public: virtual bool __thiscall oddbhostappservices::loadapp(class odstring const &)" (?loadapp@oddbhostappservices@@uae_nabvodstring@@@ z)
exsystemservices.obj : error lnk2001: unresolved external symbol "public: __thiscall odwrfilebuf:dwrfilebuf(void)" (??0odwrfilebuf@@qae@xz)
exsystemservices.obj : error lnk2001: unresolved external symbol "public: __thiscall odrdfilebuf:drdfilebuf(void)" (??0odrdfilebuf@@qae@xz)
exsystemservices.obj : error lnk2001: unresolved external symbol "public: static class odrxobjectptr __cdecl odexgirasterimage:seudoconstructor(void)" (?pseudoconstructor@odexgirasterimage@@sa?avodrxob jectptr@@xz)
exsystemservices.obj : error lnk2001: unresolved external symbol "public: void __thiscall exodolestorage::setlockbytes(void *)" (?setlockbytes@exodolestorage@@qaexpax@z)
exsystemservices.obj : error lnk2001: unresolved external symbol "public: virtual class odsmartptr<class odolestream> __thiscall exodolestorageenstream(class odstring const &,unsigned long)" (?openstream@exodolestorage@@uae?av?$odsmartptr@vo dol
estream@@@@abvodstring@@k@z)
exsystemservices.obj : error lnk2001: unresolved external symbol "public: virtual void __thiscall exodolestorage::setstorage(void *)" (?setstorage@exodolestorage@@uaexpax@z)
exsystemservices.obj : error lnk2001: unresolved external symbol "public: __thiscall exodolestorage::exodolestorage(void)" (??0exodolestorage@@qae@xz)
exsystemservices.obj : error lnk2001: unresolved external symbol "public: static class odsmartptr<class odgienhancedmetafile> __cdecl odexgienhancedmetafile::createobject(void)" (?createobject@odexgienhancedmetafile@@sa?av?$odsm artptr@vodgienhanced
metafile@@@@xz)
exsystemservices.obj : error lnk2001: unresolved external symbol "public: virtual __thiscall exodolestorage::~exodolestorage(void)" (??1exodolestorage@@uae@xz)
exsystemservices.obj : error lnk2001: unresolved external symbol "void __cdecl oda::mem_free(void *)" (?mem_free@oda@@yaxpax@z)
exsystemservices.obj : error lnk2001: unresolved external symbol "void * __cdecl oda::mem_alloc(unsigned int)" (?mem_alloc@oda@@yapaxi@z)
release/seq2dwg.exe : fatal error lnk1120: 12 unresolved externals
error executing link.exe.
seq2dwg.exe - 16 error(s), 0 warning(s)
have i forgotten to some steps here? i have tried until my hair is pulled out. extra lib files?
thank you for your help.
andrew
update..
i was using the wrong include folders. i have changed those. i have now added odfilebuf.cpp to the projhect and ignore the msvcrt library. but i still get all these errors:
--------------------configuration: seq2dwg - win32 release--------------------
linking...
nafxcw.lib(afxmem.obj) : error lnk2005: "void * __cdecl operator new(unsigned int)" (??2@yapaxi@z) already defined in dd_vc6mt_alloc.lib(odalloc.obj)
nafxcw.lib(afxmem.obj) : error lnk2005: "void __cdecl operator delete(void *)" (??3@yaxpax@z) already defined in dd_vc6mt_alloc.lib(odalloc.obj)
link : warning lnk4049: locally defined symbol "_fclose" imported
link : warning lnk4049: locally defined symbol "_setvbuf" imported
link : warning lnk4049: locally defined symbol "_fseek" imported
link : warning lnk4049: locally defined symbol "_fputc" imported
link : warning lnk4049: locally defined symbol "_fwrite" imported
link : warning lnk4049: locally defined symbol "_ftell" imported
exsystemservices.obj : error lnk2001: unresolved external symbol "public: static class odrxobjectptr __cdecl odexgirasterimage:seudoconstructor(void)" (?pseudoconstructor@odexgirasterimage@@sa?avodrxob jectptr@@xz)
exsystemservices.obj : error lnk2001: unresolved external symbol "public: void __thiscall exodolestorage::setlockbytes(void *)" (?setlockbytes@exodolestorage@@qaexpax@z)
exsystemservices.obj : error lnk2001: unresolved external symbol "public: virtual class odsmartptr<class odolestream> __thiscall exodolestorageenstream(class odstring const &,unsigned long)" (?openstream@exodolestorage@@uae?av?$odsmartptr@vo dol
estream@@@@abvodstring@@k@z)
exsystemservices.obj : error lnk2001: unresolved external symbol "public: virtual void __thiscall exodolestorage::setstorage(void *)" (?setstorage@exodolestorage@@uaexpax@z)
exsystemservices.obj : error lnk2001: unresolved external symbol "public: __thiscall exodolestorage::exodolestorage(void)" (??0exodolestorage@@qae@xz)
exsystemservices.obj : error lnk2001: unresolved external symbol "public: static class odsmartptr<class odgienhancedmetafile> __cdecl odexgienhancedmetafile::createobject(void)" (?createobject@odexgienhancedmetafile@@sa?av?$odsm artptr@vodgienhanced
metafile@@@@xz)
exsystemservices.obj : error lnk2001: unresolved external symbol "public: virtual __thiscall exodolestorage::~exodolestorage(void)" (??1exodolestorage@@uae@xz)
exsystemservices.obj : error lnk2001: unresolved external symbol "void __cdecl oda::mem_free(void *)" (?mem_free@oda@@yaxpax@z)
odfilebuf.obj : error lnk2001: unresolved external symbol "void __cdecl oda::mem_free(void *)" (?mem_free@oda@@yaxpax@z)
exsystemservices.obj : error lnk2001: unresolved external symbol "void * __cdecl oda::mem_alloc(unsigned int)" (?mem_alloc@oda@@yapaxi@z)
odfilebuf.obj : error lnk2001: unresolved external symbol "void * __cdecl oda::mem_alloc(unsigned int)" (?mem_alloc@oda@@yapaxi@z)
exhostappservices.obj : error lnk2001: unresolved external symbol "public: virtual bool __thiscall oddbhostappservices::loadapp(class odstring const &)" (?loadapp@oddbhostappservices@@uae_nabvodstring@@@ z)
odfilebuf.obj : error lnk2001: unresolved external symbol __imp__fopen
odfilebuf.obj : error lnk2001: unresolved external symbol __imp__fread
release/seq2dwg.exe : fatal error lnk1120: 12 unresolved externals
error executing link.exe.
seq2dwg.exe - 17 error(s), 6 warning(s)
update 2
i did a batch clean of my project and rebuilt it. it is now reduced to these errors:
--------------------configuration: seq2dwg - win32 release--------------------
compiling...
seq2dwg.cpp
seq2dwgdlg.cpp
generating code...
linking...
nafxcw.lib(afxmem.obj) : error lnk2005: "void * __cdecl operator new(unsigned int)" (??2@yapaxi@z) already defined in dd_vc6mt_alloc.lib(odalloc.obj)
nafxcw.lib(afxmem.obj) : error lnk2005: "void __cdecl operator delete(void *)" (??3@yaxpax@z) already defined in dd_vc6mt_alloc.lib(odalloc.obj)
release/seq2dwg.exe : fatal error lnk1169: one or more multiply defined symbols found
error executing link.exe.
seq2dwg.exe - 3 error(s), 0 warning(s)
neil said in another post (and i see it in the documentation) that there is a way to avoid including the alloc lib to avoid this.
please help me.
remove dd_vc6mt_alloc.lib from your link line, and include the odrxxxx memory functions somewhere in your project.

i reverted back to 1.10 which does not use this library.
as you may have seen in an other email, you can revise the order of the files in the dsp file before compiling. it will compile in the right order then.
maybe one day i will move up to 1.11, but even something as simple as what you suggest i have lack of confidence with because the exalloc.cpp file has special identifiers infront of the methods and it also defines new and delete.
as long as i get teh order of compile right in 1.10, it is ok..
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
 


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

高级搜索
显示模式

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

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

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】compile with visual c== 2005 express yang686526 DirectDWG 0 2009-05-04 06:01 PM
怎样不打开 visual lisp ide 也能保证 vlisp-compile 能正常运行 yang686526 ObjectARX(AutoLISP) 0 2009-04-26 08:39 PM


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


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