[GRASS5] libes/raster/pos.h and R__maxx, R__maxy

Mike Thomas mthomas at gil.com.au
Fri Aug 4 22:39:57 EDT 2000


Hi all.

While working on the Windows version of the new Makefile system,
specifically the display library, I found that "libes/raster/pos.h" which
consists of the line:

int R__curx, R__cury;

is included by four different C source files in the raster library.

How does the linker resolve these presumably four separate instances of
those symbols?  It seems dangerous to me.  If each of the four modules
communicates with it's own copy of the variables rather than one instance,
how does the display library know which one to use?

Whether or not this is a problem, data symbols can't be exported from
Windows DLL's.  As the only reference to those symbols outside the raster
library is in one file of the display library, I propose adding data access
functions for those variables to the raster library, in a file which defines
the one and only instance of the variables, and altering the display library
to use those functions.

Are there any objections.

Cheers

Mike Thomas.



---------------------------------------- 
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo at geog.uni-hannover.de with
subject 'unsubscribe grass5'



More information about the grass-dev mailing list