Skip to content

Conversation

@shuuumz44
Copy link

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.

Line 1257, "_getch()" unrecognized.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant