[Gdal-dev] Re: Using GDAL in Linux ANSI C

Marc Lepage mlepage at pyxisinnovation.com
Mon Sep 25 15:22:22 EDT 2006


Is GDAL C code wrapped in C++, or C++ code wrapped in C? I'm curious
about which way it goes and the issues involved. I've typically wrapped
C with C++, but these days it seems more projects are going the other
way.

-----Original Message-----
From: gdal-dev-bounces at lists.maptools.org
[mailto:gdal-dev-bounces at lists.maptools.org] On Behalf Of Frank
Warmerdam
Sent: Monday, September 25, 2006 2:28 PM
To: Brian S. Dixon
Cc: gdal-dev at lists.maptools.org
Subject: [Gdal-dev] Re: Using GDAL in Linux ANSI C

Brian S. Dixon wrote:
> Hi Frank,
> 
>   Our s/w is ANSI C, compiled with gcc ...Like I mentioned before,
GDAL is
> all new to me so I have some basic questions.  It looks like GDAL is
written
> in C++ ...I've never tried to utilize C++ libraries from a C program
before
> (usually the other way around).  Is this possible?  Porting our code
to C++
> is a much larger project...

Brian,

Conveniently GDAL has C cover functions already!

If you look in gdal.h you will see the C API.  Most of the C++ method
documentation refers to the related C entry point, though there is no
documentation for the C entry points so you need to work it out by
examining the prototypes.

Best regards,
-- 
---------------------------------------+--------------------------------
------
I set the clouds in motion - turn up   | Frank Warmerdam,
warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo,
http://osgeo.org

_______________________________________________
Gdal-dev mailing list
Gdal-dev at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/gdal-dev




More information about the Gdal-dev mailing list