Skip to content

Linking fails for ncurses #1

@antzucaro

Description

@antzucaro

Hi @peterbay, I'm having trouble compiling on Ubuntu 18.04. After having installed the prerequisites I run make, but it gives me errors with linking that appear to be related to ncurses:

$ make
gcc -Wall -O2 -std=c99 -D_GNU_SOURCE -D_DEFAULT_SOURCE -D_GNU_SOURCE -D_DEFAULT_SOURCE -I/usr/include/ncursesw -c camera-ctl.c -o camera-ctl.o
gcc -Wall -O2 -std=c99 -D_GNU_SOURCE -D_DEFAULT_SOURCE -D_GNU_SOURCE -D_DEFAULT_SOURCE -I/usr/include/ncursesw -lncurses -ltinfo -lncursesw -ltinfo camera-ctl.o -o camera-ctl
camera-ctl.o: In function `print_control_info':
camera-ctl.c:(.text+0x203): undefined reference to `werase'
camera-ctl.c:(.text+0x221): undefined reference to `wborder'
camera-ctl.c:(.text+0x24c): undefined reference to `mvwprintw'
camera-ctl.c:(.text+0x273): undefined reference to `mvwprintw'
camera-ctl.c:(.text+0x29a): undefined reference to `mvwprintw'
camera-ctl.c:(.text+0x2c1): undefined reference to `mvwprintw'
camera-ctl.c:(.text+0x2e8): undefined reference to `mvwprintw'
camera-ctl.o:camera-ctl.c:(.text+0x30f): more undefined references to `mvwprintw' follow
camera-ctl.o: In function `print_menu':
camera-ctl.c:(.text+0x5d0): undefined reference to `wborder'
<snipped>

I'm not familiar enough with C to figure out why this is happening, but I'd venture a guess that it's something simple. Could you take a look when you get the time? Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions