I would like to share the information I received about this subject so that other people don't wast their time like I did.
First, a fix to the makefile: Fix the following unresolved externals: ACTextUnescape ACGetColorTable ACAdjustText by adding ..\dxf\ogr_autocad_services.obj to the DXF_OBJ= line in dxf\makefile.vc The remaining unresolved symbol, type OdDbKey, is due to a missing .lib file on the public available TX SDK. One would need to be a member of the alliance to be able to download the private version that contains the complete set of components. Best regards. From: [email protected] To: [email protected]; [email protected] Date: Tue, 15 Sep 2015 11:40:21 -0400 Subject: Re: [gdal-dev] how to build dwg driver? Hi Mark, Sorry for taking so long to reply. Here is where I am with that: I downloaded three different versions of the Teigha Extension (TX) SDK: TX_SDK_3.05.0.0 TX_SDK_3.09.1.0 TX_SDK_4.01.0.0 I setup my nmake.local variables according to each one of those SDK version and tried to build against each one of them. # ================ # DWG GDAL plugin # ================ # DWG support using the Open Design Alliance Teigha Libraries TD_BASE = C:\Dev\GDAL\TX_SDK_4.01.0.0 #TD_BASE = C:\Dev\GDAL\TX_SDK_3.05.0.0 TD_FLAGS = -D_TOOLKIT_IN_DLL_ TD_INCLUDE = -I$(TD_BASE)\Core\Include -I$(TD_BASE)\Core\Extensions\ExServices #TD_INCLUDE = -I$(TD_BASE)\TD\Include -I$(TD_BASE)\TD\Extensions\ExServices !IFDEF WIN32BIT TD_LIBDIR = $(TD_BASE)\lib\v10dll !ELSE TD_LIBDIR = $(TD_BASE)\lib\vc10_amd64dll !ENDIF Note that there is a little difference on the folder names of the latest one, "TD" now is "Core": 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. There are other library files that are missing on the all the SDK versions that I tried, so I commented it: TD_LIBS = \ $(TD_LIBDIR)/TD_ExamplesCommon.lib \ # $(TD_LIBDIR)/TD_Key.lib \ $(TD_LIBDIR)/ModelerGeometry.lib \ $(TD_LIBDIR)/TD_BrepRenderer.lib \ $(TD_LIBDIR)/TD_Br.lib \ $(TD_LIBDIR)/TD_AcisBuilder.lib \ $(TD_LIBDIR)/TD_DynBlocks.lib \ $(TD_LIBDIR)/TD_Db.lib \ $(TD_LIBDIR)/TD_DbRoot.lib \ $(TD_LIBDIR)/TD_Gs.lib \ $(TD_LIBDIR)/TD_SpatialIndex.lib \ $(TD_LIBDIR)/TD_Ave.lib \ $(TD_LIBDIR)/TD_Root.lib \ $(TD_LIBDIR)/TD_Gi.lib \ $(TD_LIBDIR)/TD_Ge.lib \ # $(TD_LIBDIR)/TD_FT.lib \ $(TD_LIBDIR)/TD_Alloc.lib \ $(TD_LIBDIR)/RxRasterServices.lib \ $(TD_LIBDIR)/RecomputeDimBlock.lib \ $(TD_LIBDIR)/ExFieldEvaluator.lib \ # $(TD_LIBDIR)/OdBagFiler.lib \ $(TD_LIBDIR)/RasterProcessor.lib \ advapi32.lib The sad conclusion is that once I try to build the plugin I got that error: Creating library ogr_DWG.lib and object ogr_DWG.exp ogrdwgdriver.obj : error LNK2001: unresolved external symbol "private: virtual class OdDbKey * __cdecl OdDbHostAppServices2::key(void)const " (?key@OdDbHostAp TD_ExamplesCommon.lib(ExHostAppServices.obj) : error LNK2001: unresolved external symbol "private: virtual class OdDbKey * __cdecl OdDbHostAppServices2::key(v APEAVOdDbKey@@XZ) ogrdwgdatasource.obj : error LNK2019: unresolved external symbol "class CPLString __cdecl ACTextUnescape(char const *,char const *)" (?ACTextUnescape@@YA?AVCP ublic: void __cdecl OGRDWGDataSource::ReadLineTypeDefinitions(void)" (?ReadLineTypeDefinitions@OGRDWGDataSource@@QEAAXXZ) ogrdwglayer.obj : error LNK2001: unresolved external symbol "class CPLString __cdecl ACTextUnescape(char const *,char const *)" (?ACTextUnescape@@YA?AVCPLStri ogrdwglayer.obj : error LNK2019: unresolved external symbol "unsigned char const * __cdecl ACGetColorTable(void)" (?ACGetColorTable@@YAPEBEXZ) referenced in f :PrepareLineStyle(class OGRFeature *)" (?PrepareLineStyle@OGRDWGLayer@@AEAAXPEAVOGRFeature@@@Z) ogrdwg_dimension.obj : error LNK2001: unresolved external symbol "unsigned char const * __cdecl ACGetColorTable(void)" (?ACGetColorTable@@YAPEBEXZ) ogrdwg_hatch.obj : error LNK2001: unresolved external symbol "unsigned char const * __cdecl ACGetColorTable(void)" (?ACGetColorTable@@YAPEBEXZ) ogrdwglayer.obj : error LNK2019: unresolved external symbol "void __cdecl ACAdjustText(double,double,class OGRFeature *)" (?ACAdjustText@@YAXNNPEAVOGRFeature@ OGRFeature * __cdecl OGRDWGLayer::TranslateINSERT(class OdSmartPtr<class OdDbEntity>)" (?TranslateINSERT@OGRDWGLayer@@AEAAPEAVOGRFeature@@V?$OdSmartPtr@VOdDb ogr_DWG.dll : fatal error LNK1120: 4 unresolved externals 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. 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. 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. So I hope that exchanging that information with you we can help each other and maybe find a solution for that problem. Best regards and good luck. Ivan > Date: Tue, 11 Aug 2015 09:17:00 -0700 > From: [email protected] > To: [email protected] > Subject: Re: [gdal-dev] how to build dwg driver? > > Hello Ivan, > > I am running into a similar issue trying to build the DWG driver with the > latest Teigha libraries. Did you get your issue resolved? If I learn > anything I will post it here. > > Mark > > > > -- > View this message in context: > http://osgeo-org.1560.x6.nabble.com/gdal-dev-how-to-build-dwg-driver-tp5216555p5219383.html > Sent from the GDAL - Dev mailing list archive at Nabble.com. > _______________________________________________ > gdal-dev mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/gdal-dev _______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
_______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
