几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   DirectDWG (http://www.dimcax.com/hust/forumdisplay.php?f=89)
-   -   【转帖】dwgdirect in dll (http://www.dimcax.com/hust/showthread.php?t=15968)

yang686526 2009-05-05 08:34 AM

【转帖】dwgdirect in dll
 
dwgdirect in dll
dwgdirect in dll
hi
i've written a dll that links with the dwgdirect libraries (version 1.10). i use visual studio .net 2003 and the vc2003md (multithreaded dll) libraries from dwgdirect distribution. so far, everything works without any problems. even when i use my dll from an unmanaged c++ project (console application) i can build (and run) everything without problems.
but now i want to use the dll from a managed c++ dll. as soon as i include a header file (odacommon.h and odadefs.h are ok, but for instance entities.h not) from dwgdirect the following two error occurs:
link : error lnk2020: unresolved token (0a00006e) odrxobject.__dtor
link : error lnk2020: unresolved token (0a00006f) odrxobject.copyfrom
so there is no additional code in the dll, the single c++ in the managed dll project contains only:
code:
#include "odacommon.h"
#include "odadefs.h"
#include "entities.h"
do i have to set specific compiler, linker flags to compile the dwgdirect libraries into my dll? i've seen the following line:
code:
#ifdef _toolkit_in_dll_
do i have to define this? i tried it once but it did not work (lots of linker errors...).
has anybody ever used dwgdirect from a managed c++ dll (mixed-mode dll)? any ideas what could be wrong? is there some documentation or an example i haven't found so far?
simon


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