qrouter icon indicating copy to clipboard operation
qrouter copied to clipboard

got error while compile command make

Open paramsaini opened this issue 1 year ago • 0 comments

can someone help me out for this error. I tried to figure out this error I think there is some error in graphics.c file. I am not expert in c language so I can't remove this error from the file. can anyone provide solution of this problem it would be very helpful.

(base) paramsaini@MacBook-Pro ~ % cd qrouter (base) paramsaini@MacBook-Pro qrouter % make cc -g -O2 -I/usr/local/Cellar/tcl-tk/8.6.13_1/include/tcl-tk -I/sw/include -fno-common -fPIC -DPACKAGE_NAME="" -DPACKAGE_TARNAME="" -DPACKAGE_VERSION="" -DPACKAGE_STRING="" -DPACKAGE_BUGREPORT="" -DPACKAGE_URL="" -DSTDC_HEADERS=1 -DHAVE_SETENV=1 -DHAVE_PUTENV=1 -DHAVE_VA_COPY=1 -DHAVE___VA_COPY=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_MMAN_H=1 -DTCL_QROUTER=1 -DVERSION="1.4" -DREVISION="86" -DUSE_TCL_STUBS -DUSE_TK_STUBS
-DQROUTER_PATH="/usr/local/share/qrouter" -I/usr/local/Cellar/tcl-tk/8.6.13_1/include/tcl-tk -c graphics.c -o graphics.o graphics.c:78:5: error: implicit declaration of function 'XSetForeground' is invalid in C99 [-Werror,-Wimplicit-function-declaration] XSetForeground(dpy, gc, yellowpix); ^ graphics.c:79:5: error: implicit declaration of function 'XFillRectangle' is invalid in C99 [-Werror,-Wimplicit-function-declaration] XFillRectangle(dpy, win, gc, xspc, yspc, spacing, spacing); ^ graphics.c:80:5: error: implicit declaration of function 'XFlush' is invalid in C99 [-Werror,-Wimplicit-function-declaration] XFlush(dpy); ^ graphics.c:80:5: note: did you mean 'fflush'? /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdio.h:146:6: note: 'fflush' declared here int fflush(FILE *); ^ graphics.c:104:5: error: implicit declaration of function 'XSetForeground' is invalid in C99 [-Werror,-Wimplicit-function-declaration] XSetForeground(dpy, gc, magentapix); ^ graphics.c:112:7: error: implicit declaration of function 'XFillRectangle' is invalid in C99 [-Werror,-Wimplicit-function-declaration] XFillRectangle(dpy, win, gc, xspc, yspc, ^ graphics.c:118:5: error: implicit declaration of function 'XFlush' is invalid in C99 [-Werror,-Wimplicit-function-declaration] XFlush(dpy); ^ graphics.c:142:5: error: implicit declaration of function 'XSetForeground' is invalid in C99 [-Werror,-Wimplicit-function-declaration] XSetForeground(dpy, gc, purplepix); ^ graphics.c:150:7: error: implicit declaration of function 'XFillRectangle' is invalid in C99 [-Werror,-Wimplicit-function-declaration] XFillRectangle(dpy, win, gc, xspc, yspc, ^ graphics.c:156:5: error: implicit declaration of function 'XFlush' is invalid in C99 [-Werror,-Wimplicit-function-declaration] XFlush(dpy); ^ graphics.c:175:5: error: implicit declaration of function 'XSetForeground' is invalid in C99 [-Werror,-Wimplicit-function-declaration] XSetForeground(dpy, gc, greenyellowpix); ^ graphics.c:179:2: error: implicit declaration of function 'XFillRectangle' is invalid in C99 [-Werror,-Wimplicit-function-declaration] XFillRectangle(dpy, win, gc, xspc, yspc, spacing, spacing); ^ graphics.c:181:5: error: implicit declaration of function 'XFlush' is invalid in C99 [-Werror,-Wimplicit-function-declaration] XFlush(dpy); ^ graphics.c:206:6: error: implicit declaration of function 'XSetForeground' is invalid in C99 [-Werror,-Wimplicit-function-declaration] XSetForeground(dpy, gc, brownvector[RMASK(x, y)]); ^ graphics.c:208:6: error: implicit declaration of function 'XFillRectangle' is invalid in C99 [-Werror,-Wimplicit-function-declaration] XFillRectangle(dpy, win, gc, xspc, yspc, spacing, spacing); ^ graphics.c:211:5: error: implicit declaration of function 'XFlush' is invalid in C99 [-Werror,-Wimplicit-function-declaration] XFlush(dpy); ^ graphics.c:229:5: error: implicit declaration of function 'XSetForeground' is invalid in C99 [-Werror,-Wimplicit-function-declaration] XSetForeground(dpy, gc, ltgraypix); ^ graphics.c:236:7: error: implicit declaration of function 'XFillRectangle' is invalid in C99 [-Werror,-Wimplicit-function-declaration] XFillRectangle(dpy, buffer, gc, xspc, yspc, ^ graphics.c:251:7: error: implicit declaration of function 'XFillRectangle' is invalid in C99 [-Werror,-Wimplicit-function-declaration] XFillRectangle(dpy, buffer, gc, xspc, yspc, ^ graphics.c:306:6: error: implicit declaration of function 'XSetForeground' is invalid in C99 [-Werror,-Wimplicit-function-declaration] XSetForeground(dpy, gc, bluevector[norm * CONGEST(x, y)]); ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. make: *** [graphics.o] Error 1 (base) paramsaini@MacBook-Pro qrouter %

paramsaini avatar Mar 16 '23 00:03 paramsaini