tinytetris
tinytetris copied to clipboard
I cannot make it.
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
Looks like your missing the curses
library.
Use LDLIBS instead of LDFLAGS in makefile.
Use LDLIBS instead of LDFLAGS in makefile.
Thank you!
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
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
在 Linux 上,您可能需要使用 -lncurses 链接。当然 ncurses 库需要安装g++ -lncurses tinytetris.cpp -o tinytetris Cute game
thank you
have someone build it in window ,i can't built it
i can't too,someone who can help?
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.
- vim
Makefile
and change LDFLAGS to LDLIBS, then save it. - execute command:
g++ -o tinytetris-commented tinytetris-commented.cpp -lncurses
- execute command:
./tinytetris-commented
Hope it helps you. : )