CDP8 icon indicating copy to clipboard operation
CDP8 copied to clipboard

fix syntax error while building on linux

Open shuuumz44 opened this issue 1 month ago • 0 comments

Line 1257, "_getch()" unrecognized, outputs error,

" /home/d44/Documents/CDP8/dev/new/newtex.c: In function ‘usage2’: /home/d44/Documents/CDP8/dev/new/newtex.c:1257:20: warning: implicit declaration of function ‘_getch’; did you mean ‘getch’? [-Wimplicit-function-declaration] 1257 | while((k = _getch())!='s' && k != 'e') | ^~~~~~ | getch [ 31%] Linking C executable /home/d44/Documents/CDP8/NewRelease/newtex /usr/bin/ld: CMakeFiles/newtex.dir/newtex.c.o: in function usage2': newtex.c:(.text+0x4b78): undefined reference to _getch' collect2: error: ld returned 1 exit status make[2]: *** [dev/new/CMakeFiles/newtex.dir/build.make:101: /home/d44/Documents/CDP8/NewRelease/newtex] Error 1 make[1]: *** [CMakeFiles/Makefile2:2861: dev/new/CMakeFiles/newtex.dir/all] Error 2 make: *** [Makefile:156: all] Error 2 "

after removing the underscore it successfully builds.

shuuumz44 avatar Nov 01 '25 15:11 shuuumz44