[gdal-dev] Ogr and Dwg via Teigha (in C#)
Tamas Szekeres
szekerest at gmail.com
Sat Nov 3 14:31:53 PDT 2012
Noon,
As far as I see the DWG driver is compiled as a plugin so you should either
place it into a /gdalplugins subdirectory from where your application is
running, or set the location of this dll in the GDAL_DRIVER_PATH
environment variable.
Also make sure the location of the dll-s from the dependent libs are also
added in PATH.
Best regards,
Tamas
2012/11/3 Noon Silk <noonslists+gdal at gmail.com>
> Hi,
>
> So, further to this, I've not had much luck with my previous
> approach. I'm going to now try this method; but I kind of want to
> understand why what I tried didn't work.
>
> What I mean by "Didn't work" is that my requests to open DWG files,
> or just grab an instance of the DWG driver, didn't work.
>
> I ask for an instance like so (in C#):
>
> Ogr.RegisterAll();
> Driver d = Ogr.GetDriverByName("DWG");
>
> "d" comes back as null. So, I expected it to return something given
> that I thought I was correctly "enablding" the DWG library. But, I
> also checked to see if the number of available drivers changed, after
> me doing what I would've expected to result in the enablding. Sadly,
> it didn't. So I can only assume that I didn't enanble it correctly.
>
> So, my process for enabling the DWG driver was basically to allow it
> to be compiled as part of the "gdal\ogr\ogrsf_frmts\makefile.vc" (by
> adding in the directory and the obj files). I also set up the required
> Teigha libraries by uncommenting and correctly setting the particular
> bits of nmake.opt.
>
> Then the only other change I made was to generate the SWIG bindings.
>
> Is this the correct way to enable the dwg bindings? Is there
> something obvious I've missed? Would linking this other -dev build
> script with the particular source work better?
>
> Thanks,
> --
> Noon
>
>
>
>
> On Fri, Nov 2, 2012 at 9:30 AM, Noon Silk <noonslists+gdal at gmail.com>
> wrote:
> > On Mon, Oct 29, 2012 at 11:34 PM, Tamas Szekeres <szekerest at gmail.com>
> wrote:
> >> You might also take a look at the -dev packages at
> >> http://www.gisinternals.com/sdk/
> >> The compilation is controlled by a single makefile, so you can use:
> >>
> >> nmake gdal
> >> nmake gdal-csharp
> >
> > Thanks; I happened to grab the "MSVC2005 (Win64) -development", which
> > doesn't have that ..., I'll give this a go.
> >
> >
> >> to achieve the desired result.
> >>
> >> Best regards,
> >>
> >> Tamas
> >
> > --
> > Noon
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20121103/d3db55d8/attachment.html>
More information about the gdal-dev
mailing list