[Liblas-devel] .net/mono bindings in c#

Mateusz Loskot mateusz at loskot.net
Wed Aug 6 10:23:09 EDT 2008


Martin Rodriguez wrote:
> Hi all:
> 
> I am working in .net/mono bindings to liblas and i have something like
> 80% work done,

Martin,

Great news!

> but i have several problems:
> 
> -          I have created a successful mingw compilation without use
> CAPI module. This module use a macro _MSC_VER in the las_config.h header
> 
> /* FIXME -  Ticket #23 */
> 
> #ifdef _MSC_VER
> 
> #define PACKAGE_VERSION "1.0.0b1"
> 
> #endif
> 
> -          CAPI use this macro only to return in a function.  I believe
> in liblas purposes we could do something like this:
> 
> -          defined(__CYGWIN__) || defined(__MINGW32__) ||
> defined(_MSC_VER)

Good point. Could you please report it as a Ticket [1] and attach
proposed changes in all places you need?

[1] http://liblas.org/

> - C++ API compile and works fine, but I am worried because I see the
> macro in some other headers like bin endian/little endian module.

You mean the _MSC_VER macro used in there?
If yes, so while reporting a ticket, pelase specify all places where you
propose to change it.

> -          Anyway I am using your DLL for .NET, but it would be great
> for me work with my DLL. Besides Mingw binaries are very useful for me
> because almost all APIs I use in C/C++ are ready to mingw (gtk,gtkmm,
> inscape, gimp, vala, ruby, etc, etc) . There many only 2 libraries I use
> for VS like Mysql and postgree, but mingw have a DLL converter tool to
> import them. .NET have the advantage to find entry point in mingw and vc
> DLL in the same way.

Understood.

> -          I am working in Setters and getters in c# and I see some rare
> things in the CAPI module. 
> 
> LAS_DLL uint8_t LASHeader_GetDataFormatId(const LASHeaderH hHeader);
> 
> -          LAS_DLL LASError LASHeader_SetDataFormatId(const LASHeaderH
> hHeader, int value); 
>
> -          Why do you have a kind of data to c++ to the getter and other
> to the setter???. In c++ this is not a problem because the getters and
> setter are visible, but in .NET not (only in compiled code). I saw like
> 3 functions like that. 

You mean the uint8_t vs int ?
Yes, it's incorrect and I believe it should be changed to uint8_t.

Howard, do you have any objections about this fix?


Martin, if I may ask, are you going to publish your C# bindings as Open
Source?

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net
Charter Member of OSGeo, http://osgeo.org



More information about the Liblas-devel mailing list