<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hi Mark,<br><br>Sorry for taking so long to reply.<br><br>Here is where I am with that:<br><br>I downloaded three different versions of the Teigha Extension (TX) SDK:<br><br><blockquote><font style="" face="Courier New,sans-serif">TX_SDK_3.05.0.0</font><font style="" face="Courier New,sans-serif"><br></font><font style="" face="Courier New,sans-serif">TX_SDK_3.09.1.0</font><font style="" face="Courier New,sans-serif"><br></font><font style="" face="Courier New,sans-serif">TX_SDK_4.01.0.0</font><br></blockquote><br>I setup my nmake.local variables according to each one of those SDK version and tried to build against each one of them.<br><br><blockquote><font style="" face="Courier New,sans-serif"># ================</font><font style="" face="Courier New,sans-serif"><br></font><font style="" face="Courier New,sans-serif"># DWG GDAL plugin</font><font style="" face="Courier New,sans-serif"><br></font><font style="" face="Courier New,sans-serif"># ================</font><font style="" face="Courier New,sans-serif"><br></font><font style="" face="Courier New,sans-serif"><br></font><font style="" face="Courier New,sans-serif"># DWG support using the Open Design Alliance Teigha Libraries</font><font style="" face="Courier New,sans-serif"><br></font><font style="" face="Courier New,sans-serif"><br></font><font style="" face="Courier New,sans-serif">TD_BASE = C:\Dev\GDAL\TX_SDK_4.01.0.0</font><font style="" face="Courier New,sans-serif"><br></font><font style="" face="Courier New,sans-serif">#TD_BASE = C:\Dev\GDAL\TX_SDK_3.05.0.0</font><font style="" face="Courier New,sans-serif"><br></font><font style="" face="Courier New,sans-serif">TD_FLAGS = -D_TOOLKIT_IN_DLL_</font><font style="" face="Courier New,sans-serif"><br></font><font style="" face="Courier New,sans-serif">TD_INCLUDE = -I$(TD_BASE)\Core\Include -I$(TD_BASE)\Core\Extensions\ExServices</font><font style="" face="Courier New,sans-serif"><br></font><font style="" face="Courier New,sans-serif">#TD_INCLUDE = -I$(TD_BASE)\TD\Include -I$(TD_BASE)\TD\Extensions\ExServices</font><font style="" face="Courier New,sans-serif"><br></font><font style="" face="Courier New,sans-serif">!IFDEF WIN32BIT</font><font style="" face="Courier New,sans-serif"><br></font><font style="" face="Courier New,sans-serif">TD_LIBDIR = $(TD_BASE)\lib\v10dll</font><font style="" face="Courier New,sans-serif"><br></font><font style="" face="Courier New,sans-serif">!ELSE</font><font style="" face="Courier New,sans-serif"><br></font><font style="" face="Courier New,sans-serif">TD_LIBDIR = $(TD_BASE)\lib\vc10_amd64dll </font><font style="" face="Courier New,sans-serif"><br></font><font style="" face="Courier New,sans-serif">!ENDIF</font><br></blockquote><br>Note that there is a little difference on the folder names of the latest one, "TD" now is "Core":<br><br>Before build the plugin, I build the project on $(TD_BASE)\Platform\vc10_amd64dll\ODA_vc10_amd64dll.sln to generate the library TD_ExamplesCommon.lib required by ogr\ogrsf_frmts\dwg\nmakefile.vc.<br><br>There are other library files that are missing on the all the SDK versions that I tried, so I commented it:<br><br><blockquote><font style="" face="Courier New,sans-serif">TD_LIBS = \</font><font style="" face="Courier New,sans-serif"><br></font><font style="" face="Courier New,sans-serif"> $(TD_LIBDIR)/TD_ExamplesCommon.lib \</font><font style="" face="Courier New,sans-serif"><br></font><font style="" face="Courier New,sans-serif"># $(TD_LIBDIR)/TD_Key.lib \</font><font style="" face="Courier New,sans-serif"><br></font><font style="" face="Courier New,sans-serif"> $(TD_LIBDIR)/ModelerGeometry.lib \</font><font style="" face="Courier New,sans-serif"><br></font><font style="" face="Courier New,sans-serif"> $(TD_LIBDIR)/TD_BrepRenderer.lib \</font><font style="" face="Courier New,sans-serif"><br></font><font style="" face="Courier New,sans-serif"> $(TD_LIBDIR)/TD_Br.lib \</font><font style="" face="Courier New,sans-serif"><br></font><font style="" face="Courier New,sans-serif"> $(TD_LIBDIR)/TD_AcisBuilder.lib \</font><font style="" face="Courier New,sans-serif"><br></font><font style="" face="Courier New,sans-serif"> $(TD_LIBDIR)/TD_DynBlocks.lib \</font><font style="" face="Courier New,sans-serif"><br></font><font style="" face="Courier New,sans-serif"> $(TD_LIBDIR)/TD_Db.lib \</font><font style="" face="Courier New,sans-serif"><br></font><font style="" face="Courier New,sans-serif"> $(TD_LIBDIR)/TD_DbRoot.lib \</font><font style="" face="Courier New,sans-serif"><br></font><font style="" face="Courier New,sans-serif"> $(TD_LIBDIR)/TD_Gs.lib \</font><font style="" face="Courier New,sans-serif"><br></font><font style="" face="Courier New,sans-serif"> $(TD_LIBDIR)/TD_SpatialIndex.lib \</font><font style="" face="Courier New,sans-serif"><br></font><font style="" face="Courier New,sans-serif"> $(TD_LIBDIR)/TD_Ave.lib \</font><font style="" face="Courier New,sans-serif"><br></font><font style="" face="Courier New,sans-serif"> $(TD_LIBDIR)/TD_Root.lib \</font><font style="" face="Courier New,sans-serif"><br></font><font style="" face="Courier New,sans-serif"> $(TD_LIBDIR)/TD_Gi.lib \</font><font style="" face="Courier New,sans-serif"><br></font><font style="" face="Courier New,sans-serif"> $(TD_LIBDIR)/TD_Ge.lib \</font><font style="" face="Courier New,sans-serif"><br></font><font style="" face="Courier New,sans-serif"># $(TD_LIBDIR)/TD_FT.lib \</font><font style="" face="Courier New,sans-serif"><br></font><font style="" face="Courier New,sans-serif"> $(TD_LIBDIR)/TD_Alloc.lib \</font><font style="" face="Courier New,sans-serif"><br></font><font style="" face="Courier New,sans-serif"> $(TD_LIBDIR)/RxRasterServices.lib \</font><font style="" face="Courier New,sans-serif"><br></font><font style="" face="Courier New,sans-serif"> $(TD_LIBDIR)/RecomputeDimBlock.lib \</font><font style="" face="Courier New,sans-serif"><br></font><font style="" face="Courier New,sans-serif"> $(TD_LIBDIR)/ExFieldEvaluator.lib \</font><font style="" face="Courier New,sans-serif"><br></font><font style="" face="Courier New,sans-serif"># $(TD_LIBDIR)/OdBagFiler.lib \</font><font style="" face="Courier New,sans-serif"><br></font><font style="" face="Courier New,sans-serif"> $(TD_LIBDIR)/RasterProcessor.lib \</font><font style="" face="Courier New,sans-serif"><br></font><font style="" face="Courier New,sans-serif"> advapi32.lib</font><br></blockquote><br>The sad conclusion is that once I try to build the plugin I got that error:<br><br><blockquote><font style="" face="Courier New,sans-serif"> Creating library ogr_DWG.lib and object ogr_DWG.exp</font><font style="" face="Courier New,sans-serif"><br></font><font style="" face="Courier New,sans-serif">ogrdwgdriver.obj : error LNK2001: unresolved external symbol "private: virtual class <b>OdDbKey </b>* __cdecl OdDbHostAppServices2::key(void)const " (?key@OdDbHostAp</font><font style="" face="Courier New,sans-serif"><br></font><font style="" face="Courier New,sans-serif">TD_ExamplesCommon.lib(ExHostAppServices.obj) : error LNK2001: unresolved external symbol "private: virtual class <b>OdDbKey </b>* __cdecl OdDbHostAppServices2::key(v</font><font style="" face="Courier New,sans-serif"><br></font><font style="" face="Courier New,sans-serif">APEAVOdDbKey@@XZ)</font><font style="" face="Courier New,sans-serif"><br></font><font style="" face="Courier New,sans-serif">ogrdwgdatasource.obj : error LNK2019: unresolved external symbol "class CPLString __cdecl <b>ACTextUnescape</b>(char const *,char const *)" (?ACTextUnescape@@YA?AVCP</font><font style="" face="Courier New,sans-serif"><br></font><font style="" face="Courier New,sans-serif">ublic: void __cdecl OGRDWGDataSource::ReadLineTypeDefinitions(void)" (?ReadLineTypeDefinitions@OGRDWGDataSource@@QEAAXXZ)</font><font style="" face="Courier New,sans-serif"><br></font><font style="" face="Courier New,sans-serif">ogrdwglayer.obj : error LNK2001: unresolved external symbol "class CPLString __cdecl <b>ACTextUnescape</b>(char const *,char const *)" (?ACTextUnescape@@YA?AVCPLStri</font><font style="" face="Courier New,sans-serif"><br></font><font style="" face="Courier New,sans-serif">ogrdwglayer.obj : error LNK2019: unresolved external symbol "unsigned char const * __cdecl <b>ACGetColorTable</b>(void)" (?ACGetColorTable@@YAPEBEXZ) referenced in f</font><font style="" face="Courier New,sans-serif"><br></font><font style="" face="Courier New,sans-serif">:PrepareLineStyle(class OGRFeature *)" (?PrepareLineStyle@OGRDWGLayer@@AEAAXPEAVOGRFeature@@@Z)</font><font style="" face="Courier New,sans-serif"><br></font><font style="" face="Courier New,sans-serif">ogrdwg_dimension.obj : error LNK2001: unresolved external symbol "unsigned char const * __cdecl <b>ACGetColorTable</b>(void)" (?ACGetColorTable@@YAPEBEXZ)</font><font style="" face="Courier New,sans-serif"><br></font><font style="" face="Courier New,sans-serif">ogrdwg_hatch.obj : error LNK2001: unresolved external symbol "unsigned char const * __cdecl <b>ACGetColorTable</b>(void)" (?ACGetColorTable@@YAPEBEXZ)</font><font style="" face="Courier New,sans-serif"><br></font><font style="" face="Courier New,sans-serif">ogrdwglayer.obj : error LNK2019: unresolved external symbol "void __cdecl <b>ACAdjustText</b>(double,double,class OGRFeature *)" (?ACAdjustText@@YAXNNPEAVOGRFeature@</font><font style="" face="Courier New,sans-serif"><br></font><font style="" face="Courier New,sans-serif"> OGRFeature * __cdecl OGRDWGLayer::TranslateINSERT(class OdSmartPtr<class OdDbEntity>)" (?TranslateINSERT@OGRDWGLayer@@AEAAPEAVOGRFeature@@V?$OdSmartPtr@VOdDb</font><font style="" face="Courier New,sans-serif"><br></font><font style="" face="Courier New,sans-serif">ogr_DWG.dll : fatal error LNK1120: 4 unresolved externals</font><br></blockquote><br>Some of those missing symbol can be found on the source code that comes with the SDK but there is no building project to add them to the missing .lib files, TD_Key.lib, TD_FT.lib or TD_OdBagFiler.lib.<br><br>I personally, don't need to build or use the OGR DWG plugin, I am just trying to help a friend. So that was as far as I did.<br><br>I also tried to contact the author of that OGR driver but I didn't get a response yet. He probably wrote that driver a long time ago when the SDK as DWGDirect and he might not be able to help now. I understand.<br><br>So I hope that exchanging that information with you we can help each other and maybe find a solution for that problem. <br><br>Best regards and good luck.<br><br>Ivan<br><br><br><div>> Date: Tue, 11 Aug 2015 09:17:00 -0700<br>> From: myoung@pyxisinnovation.com<br>> To: gdal-dev@lists.osgeo.org<br>> Subject: Re: [gdal-dev] how to build dwg driver?<br>> <br>> Hello Ivan,<br>> <br>> I am running into a similar issue trying to build the DWG driver with the<br>> latest Teigha libraries. Did you get your issue resolved? If I learn<br>> anything I will post it here.<br>> <br>> Mark<br>> <br>> <br>> <br>> --<br>> View this message in context: http://osgeo-org.1560.x6.nabble.com/gdal-dev-how-to-build-dwg-driver-tp5216555p5219383.html<br>> Sent from the GDAL - Dev mailing list archive at Nabble.com.<br>> _______________________________________________<br>> gdal-dev mailing list<br>> gdal-dev@lists.osgeo.org<br>> http://lists.osgeo.org/mailman/listinfo/gdal-dev<br></div> </div></body>
</html>