Hi guys,
i’m a newbie in programming and working with sublimetext3.
I got my first lesson’s in my school about the language “C”.
My problem is, that i get some errors, if i try to include the curses.h library.
I already installed the libncurses5-dev packages, but i don’t know whats gwan.
Here is my script:
#include <stdio.h>
#include <curses.h>
int main()
{
char CodeByte;
printf("Bitte betaetigen Sie die Funktionstaste F7 !\n\n");
CodeByte = getch();
printf("1. Tastencode-Byte: %2d\n",CodeByte);
CodeByte = getch();
printf("2. Tastencode-Byte: %2d\n",CodeByte);
getch();
return 0;
}
Here my Log:
/tmp/ccPdiLDF.o: In function
main': cursestest.c:(.text+0x15): undefined reference to
stdscr’
cursestest.c:(.text+0x1d): undefined reference towgetch' cursestest.c:(.text+0x3c): undefined reference to
stdscr’
cursestest.c:(.text+0x44): undefined reference towgetch' cursestest.c:(.text+0x63): undefined reference to
stdscr’
cursestest.c:(.text+0x6b): undefined reference to `wgetch’
collect2: error: ld returned 1 exit status
[Finished in 0.1s with exit code 1]
[cmd: [‘g++’, ‘/media/oem/Daten/Dokumente/C/cursestest.c’, ‘-o’, ‘/media/oem/Daten/Dokumente/C/cursestest’]]
[dir: /media/oem/Daten/Dokumente/C]
[path: /home/oem/bin:/home/oem/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games]
BTW: I’m from Germany so forgive my grammar misstakes. I hope you can help me. It’s would be nice to get the answers, so easy as possible. Cause my technical know is not the best. Thanks
I’m using OS Linuxmint 18.1