[GRASS5] problem grass library gis.a

Nico Hardebol harj at geo.vu.nl
Fri Jul 4 09:52:20 EDT 2003


many thanks,

the comments on linking the ZLib libraries did solve my problems to compile
my routine with some 2d raster functions, even outsite the grass source
three.
> These are ZLIB functions (gzip compression). You need to add -lz to
> the link command; this is normally done via $(XDRLIB). However, while
> you are referencing that variable, you don't appear to be defining it
> anywhere (the GRASS makefiles are dynamically generated by
> concatenating several fragments, including src/CMD/head/head.<arch>
> and the directory's Gmakefile).

However I become aware that I should invest more in experience on makefiles
and placing my code within the grass source tree especial for the g3d
functions this is a must - from what I understood ( since no libraries are
created in the usr/local/...)
> typically you would add your code to the GRASS source tree, along with
> a Gmakefile; that way, all of the relevant make variables will be
> defined. However, the GRASS build mechanism currently doesn't handle
> C++ (at least, not in 5.0.2; the CVS HEAD version has some C++
> support, but it isn't guaranteed; it probably won't work if your C++
> compiler is significantly different to your C compiler, although
> gcc/g++ will probably work).
Combining c and c++ with g++ does work properly don't forget the extern "C"
(thank you Xueming WU) it was absent in one of my headers...

>> G3D - library. While gis.h and gis.a can be found in /usr/local/grass5/
>> include & lib, the g3d.h and g3d.a(?) are not.

Glynn Clements wrote:
> "make install" doesn't install the GRASS libraries or headers (except
> for libgis and libdatetime), or any of the makefile fragments, so you
> can't build "stand alone" GRASS modules (i.e. you can't build them
> outside of the GRASS source tree).

I will study this in more detail to solve my problems with g3d, does I have
to consider CVS and complex makefiles with calling other makefiles in the
grass source tree? - I'll study the programmanual grass50.
At this moment I'm working in Kdevelop as lazy programer without much
experience.. I think I can't handle it in Kdevlop anymore?

Nico Hardebol




More information about the grass-dev mailing list