[Liblas-devel] .net/mono bindings in c#
Martin Rodriguez
mrodriguez at stereocarto.com
Mon Aug 11 03:06:38 EDT 2008
Hi:
> You only
> can see _MSC_VER in glib because is the only exception.
> http://www.winehq.org/pipermail/wine-patches/2002-August/003110.html
> OK, I've read it. Do you mean that the typedef is not properly handled
> by MinGW so #define is preferred, as said:
> "Using a typedef can tweak bugs in the C++ parser under Mingw32"
> If yes, they I can add new level of #ifdef dedicated for MinGW and
> changing integer types definition to #define instead of typedef.
> Is this what you need?
> I think liblas c++ API is fully compatible with mingw right now. I need do
> many more test but I am almost sure of it. The only problem is in the CAPI
> module.
> You mean the problem with #define vs typedef ?
No no please. LIBLAS is fully compatible. I try explain. I only said I had
doubs about the types in mingw, but I only have doubs. Only that.
The only macro with problems in the las_config.h header. But that it´s not a
problem I think. If you see that file you understand why I say it. In the c
api module you use a macro only defined in vc and therefore I can not
compiled in mingw, but it´s really easy to solve that.
In respect to typedef I think work fine because gtk and gtkmm are full of
that and I don´t have problems with that. I didn´t put the link for that.
I have worked with gtk+ compiled with gcc and with gtk+ compiled with g++
and with gtkmm compiled with g++ and I don´t have problems.
It´s also possible work with visual studio, but I don´t try it:
http://www.gtkmm.org/docs/gtkmm-2.4/docs/tutorial/html/chapter-msvc.html
This is a nice code to work always in mingw:
#ifdef __MINGW32__
#ifndef __MINGW__
#define __MINGW__
#endif
#ifndef __WIN32__
#define __WIN32__
#endif
#endif
In my case I have defined the __MINGW32__ and __WIN32__ by default.
Mingw is a the native version of gcc and g++ for windows and therefore is
fully compatible like in linux with c++ standard.
> C++ and C API is tested with a bunch of unit tests
> http://liblas.org/browser/trunk/test/unit
Nice. I`ll try it for mingw.
> I understand that C++ unit tests and Python tests are useless for
> you directly, and .NET/Mono needs to be equipped with its own tests.
Yes. I think so.
> Perhaps you could create 'tests' subdirectory insinde your bindings
> module and create dedicated unit tests based on native features of
>.NET/Mono. I think it would be a good idea for you to use teste cases
> from the C++ and Python tests but implement in .NET/Mono way.
Yes thank you, this week I hope have time to that.
Regards.
More information about the Liblas-devel
mailing list