After upgrade to grx-2.4.6 found that using graphresult() from C++ programm causes unresolved references. Moving actual check to __gr_graphresult() and changing graphresult() to call __gr_graphresult() fixes problem.
Checked now for Linux X11 build only
Andris
--- grx246/src/bgi/graphres.c~1 2001-01-12 19:35:12.000000000 +0200 +++ grx246/src/bgi/graphres.c 2004-01-08 12:19:42.000000000 +0200 @@ -25,5 +25,7 @@ #include "bccgrx00.h"
int __gr_graphresult(void) { - return graphresult(); + int res = (__gr_INIT ? __gr_Result : grNoInitGraph); + __gr_Result = grOk; + return res; } --- grx246/include/libbcc.h~1 2002-07-30 00:33:46.000000000 +0300 +++ grx246/include/libbcc.h 2004-01-08 12:22:31.000000000 +0200 @@ -557,7 +557,7 @@ int getvisualpage(void); #define getmaxmode() (__gr_set_up_modes(), __gr_MaxMode) #define getmoderange(gd, lomode, himode) \ __gr_getmoderange((gd),(lomode),(himode)) -/* graphresult() uses local variable res */ +#define graphresult() __gr_graphresult() #define getx() (__gr_X+0) #define gety() (__gr_Y+0) #define moveto(x, y) do { __gr_X = (x); __gr_Y = (y); } while(0) @@ -638,9 +638,7 @@ void (getmoderange)(int gd, int *lomode,
/* ----------------------------------------------------------------- */ int (graphresult)(void) { - int res = (__gr_INIT ? __gr_Result : grNoInitGraph); - __gr_Result = grOk; - return res; + return __gr_graphresult(); }
/* ----------------------------------------------------------------- */