tinytetris icon indicating copy to clipboard operation
tinytetris copied to clipboard

I cannot make it.

Open tong-hao opened this issue 5 years ago • 9 comments

linux:~/code/other/tinytetris$ make
g++   -lcurses  tinytetris.cpp   -o tinytetris
/tmp/ccNKijAL.o: In function `F()':
tinytetris.cpp:(.text+0xf7): undefined reference to `move'
tinytetris.cpp:(.text+0x161): undefined reference to `stdscr'
tinytetris.cpp:(.text+0x171): undefined reference to `wattr_on'
tinytetris.cpp:(.text+0x184): undefined reference to `printw'
tinytetris.cpp:(.text+0x19c): undefined reference to `stdscr'
tinytetris.cpp:(.text+0x1ac): undefined reference to `wattr_off'
tinytetris.cpp:(.text+0x1ce): undefined reference to `move'
tinytetris.cpp:(.text+0x1e7): undefined reference to `printw'
tinytetris.cpp:(.text+0x1ec): undefined reference to `refresh'
/tmp/ccNKijAL.o: In function `L()':
tinytetris.cpp:(.text+0x634): undefined reference to `stdscr'
tinytetris.cpp:(.text+0x63c): undefined reference to `wgetch'
/tmp/ccNKijAL.o: In function `main':
tinytetris.cpp:(.text+0x83f): undefined reference to `initscr'
tinytetris.cpp:(.text+0x844): undefined reference to `start_color'
tinytetris.cpp:(.text+0x877): undefined reference to `init_pair'
tinytetris.cpp:(.text+0x89c): undefined reference to `resizeterm'
tinytetris.cpp:(.text+0x8a1): undefined reference to `noecho'
tinytetris.cpp:(.text+0x8a8): undefined reference to `stdscr'
tinytetris.cpp:(.text+0x8b5): undefined reference to `wtimeout'
tinytetris.cpp:(.text+0x8bf): undefined reference to `curs_set'
tinytetris.cpp:(.text+0x8c6): undefined reference to `stdscr'
tinytetris.cpp:(.text+0x8d8): undefined reference to `box'
tinytetris.cpp:(.text+0x8e2): undefined reference to `endwin'
collect2: error: ld returned 1 exit status
<builtin>: recipe for target 'tinytetris' failed
make: *** [tinytetris] Error 1

tong-hao avatar May 24 '19 03:05 tong-hao

Looks like your missing the curses library.

daxxog avatar Jul 16 '20 14:07 daxxog

Use LDLIBS instead of LDFLAGS in makefile.

pzibang avatar Dec 06 '20 14:12 pzibang

Use LDLIBS instead of LDFLAGS in makefile.

Thank you!

Rainbwo avatar Mar 17 '21 07:03 Rainbwo

Looks like your missing the curses library.

How to install "curses" in windows, i try to search on google but i can't find it

ZuoDaBao avatar Jun 21 '21 04:06 ZuoDaBao

On linux you may need to link with -lncurses. Of course ncurses library needs to be installed g++ -lncurses tinytetris.cpp -o tinytetris Cute game

felixzng avatar Sep 17 '21 18:09 felixzng

在 Linux 上,您可能需要使用 -lncurses 链接。当然 ncurses 库需要安装g++ -lncurses tinytetris.cpp -o tinytetris Cute game

thank you

forevergodd avatar Dec 08 '21 13:12 forevergodd

have someone build it in window ,i can't built it

hqf2591102423 avatar Dec 27 '21 01:12 hqf2591102423

i can't too,someone who can help?

xiaodongYao avatar Aug 09 '22 07:08 xiaodongYao

have someone build it in window ,i can't built it

I also encountered this error when installing, the following steps are my successful record, I hope it can help you.

  1. vim Makefile and change LDFLAGS to LDLIBS, then save it.
  2. execute command: g++ -o tinytetris-commented tinytetris-commented.cpp -lncurses
  3. execute command: ./tinytetris-commented

Hope it helps you. : )

Jalever avatar Aug 26 '23 10:08 Jalever