To: djgpp AT sun DOT soe DOT clarkson DOT edu From: Mike Piff Date: 15 Mar 94 08:49:33 Subject: Graphics and C++ Reply-To: Mike Piff I have a program that compilers and runs successfully as a .C program. I changed it to a .CC program, and tried -lgr_p as a guess, but then I get undefined reference to 'mcount' lots of times. Any ideas what I am doing wrong? Also, getkey() isn't accepted any more as a statement. (Program appended as a freebie.) Mike Piff /* Auto-stereo program---Mike Piff*/ #include #include #include #include #define EYES 180 #define GROUND (EYES/2) int WIDTH, HEIGHT,RADIUS; int same[2000],colour[2000]; int nrfcolours; int randomColour() { return (int)((16.0*(float)random())/((float)RAND_MAX))%nrfcolours; } int ancestor(int i) { if(same[i]==i) return i; else return ancestor(same[i]); } draw3D(int (*z)(int,int)) { int x,y,i,j,sep; for(y=0;y=0)&&(j=0;x--) { if(same[x]==x) colour[x]=randomColour(); else colour[x]=colour[ancestor(x)]; GrPlot(x,y,colour[x]); }; } } int sphere(int x,int y) { int r,R,a,b; a=WIDTH/2; b=HEIGHT/2; x=x-a; y=y-b; r=(x*x+y*y); R=RADIUS*RADIUS; if(r