tak jak w temacie: poszukuję dobrego kursu ncurses w c dla linuksa. Może być polski lub angielski. Wszystko co wujek google pokazuje to wyniki sprzed 3 - 4 lat...
Można w Google określić, że chcesz wyniki z 2011 roku :)
http://www.google.pl/search?q=ncurses+tutorial&hl=pl&safe=off&client=firefox-a&hs=LLc&rls=org.mozilla%3Apl%3Aofficial&sa=X&ei=Mx7vTpSBD8j14QTFmLmZCQ&ved=0CA0QpwUoBg&source=lnt&tbs=cdr%3A1%2Ccd_min%3A2011%2Ccd_max%3A&tbm=
Przecież wszystko jest w paczce. Dokumentacja, tutorial i mnóstwo przykładów.
jarpen napisał(a)
Przecież wszystko jest w paczce. Dokumentacja, tutorial i mnóstwo przykładów.
taa... tylko, że żaden z nich nie chce mi się skompilować :/
[/tmp/test] gcc -o demo_panels demo_panels.c -lncurses
demo_panels.c:34:23: error: test.priv.h: Nie ma takiego pliku ani katalogu
demo_panels.c: In function ‘main’:
demo_panels.c:814: warning: incompatible implicit declaration of built-in function ‘printf’
demo_panels.c:815: error: ‘EXIT_FAILURE’ undeclared (first use in this function)
demo_panels.c:815: error: (Each undeclared identifier is reported only once
demo_panels.c:815: error: for each function it appears in.)
mimo, że ten plik jest w tym samym katalogu...
masz tam makefile. ./configure, a później make.
jarpen napisał(a)
masz tam makefile. ./configure, a później make.
pliku Makefile nie ma jest Makefile.in a to jest różnica :P a poza tym już tego próbowałem
[/tmp/test] ls
aclocal.m4 cardfile.dat configure* demo_panels.c edit_field.c gdc.c ins_wide.c lrtest.c ncurses_tst.hin savescreen.c test_addwstr.c test_opaque.c xmas.c
background.c chgat.c configure.in demo_termcap.c edit_field.h hanoi.c key_names.c Makefile.in newdemo.c savescreen.sh* test_arrays.c test.priv.h xterm-16color.dat
blue.c clip_printw.c demo_altkeys.c demo_terminfo.c filter.c hashtest.c keynames.c make-tar.sh* programs tclock.c testcurs.c testscanw.c xterm-256color.dat
bs.6 color_set.c demo_defkey.c ditto.c firework.c inchs.c knight.c mk-test.awk railroad.c testaddch.c test_getstr.c tracemunch xterm-88color.dat
bs.c confdefs.h demo_forms.c dots.c firstlast.c inch_wide.c linedata.h modules rain.c test_addchstr.c test_get_wstr.c view.c
bulgarian-utf8.txt config.cache demo_keyok.c dots_mvcur.c foldkeys.c insdelln.c linux-color.dat movewindow.c README test_addstr.c test_instr.c widechars-utf8.txt
cardfile.c config.log demo_menus.c echochar.c gdc.6 inserts.c listused.sh ncurses.c redraw.c test_add_wchstr.c test_inwstr.c worm.c
[/tmp/test] ./configure
loading cache ./config.cache
checking for X... no
configure: error: can not find install-sh or install.sh in . ./.. ./../..
[/tmp/test]
ale jest też configure.in więc myślałem, że polecenie autoreconf -i coś da ale nie zadziałało:
[/tmp/test] autoreconf -i
autoheader: warning: missing template: CC_HAS_PROTOS
autoheader: Use AC_DEFINE([CC_HAS_PROTOS], [], [Description])
autoheader: warning: missing template: CURSES_ACS_ARRAY
autoheader: warning: missing template: HAVE_CURSES_VERSION
autoheader: warning: missing template: HAVE_LIBUTF8_H
autoheader: warning: missing template: HAVE_LIBXT
autoheader: warning: missing template: HAVE_NCURSESW_NCURSES_H
autoheader: warning: missing template: HAVE_NCURSESW_TERM_H
autoheader: warning: missing template: HAVE_NCURSES_H
autoheader: warning: missing template: HAVE_NCURSES_NCURSES_H
autoheader: warning: missing template: HAVE_NCURSES_TERM_H
autoheader: warning: missing template: HAVE_SYS_TIME_SELECT
autoheader: warning: missing template: HAVE_TERM_H
autoheader: warning: missing template: HAVE_XCURSES
autoheader: warning: missing template: NCURSES
autoheader: warning: missing template: NCURSES_EXT_FUNCS
autoheader: warning: missing template: NEED_WCHAR_H
autoheader: warning: missing template: SIG_ATOMIC_T
autoheader: warning: missing template: SYSTEM_NAME
autoheader: warning: missing template: UNIX
autoheader: warning: missing template: USE_WIDEC_SUPPORT
autoheader: warning: missing template: XCURSES
autoheader: warning: missing template: attr_t
autoheader: warning: missing template: mbstate_t
autoheader: warning: missing template: wchar_t
autoheader: warning: missing template: wint_t
autoreconf: /usr/bin/autoheader failed with exit status: 1
:(
./configure przygotowuje Ci Makefile, pozniej tylko robisz 'make' i masz wszystkie przyklady skompilowane. Chyba, ze nie masz zainstalowanych wczesniej bibliotek ncurses dla developerow. W Debianie i pochodnych wystarczy 'apt-get install libncurses5-dev'.
http://4programmers.net/Pastebin/1507
jarpen napisał(a)
:(
./configure przygotowuje Ci Makefile, pozniej tylko robisz 'make' i masz wszystkie przyklady skompilowane. Chyba, ze nie masz zainstalowanych wczesniej bibliotek ncurses dla developerow. W Debianie i pochodnych wystarczy 'apt-get install libncurses5-dev'.
http://4programmers.net/Pastebin/1507
***... może przeczytaj mojego poprzedniego posta... Widać tam, że configure się wywala a skoro mam przykłady to i mam libncurses5-dev zainstalowane... ponowna generacja pliku configure z configure.in też się nie powiodła
angel2953 napisał(a)
Widać tam, że configure się wywala a skoro mam przykłady to i mam libncurses5-dev zainstalowane... ponowna generacja pliku configure z configure.in też się nie powiodła
Mozesz miec przyklady bez zainstalowanej paczki. Zostaw w spokoju configure.in. Napisalem ci jak to zrobić, a za tego minusa to ci powiem, że jesteś tępa.
Polskie tłumaczenie [url=http://alibrus.wordpress.com/how-to/ncurses]NCURSES Programming HOWTO[/url]
@up_edit:
Polskie tłumaczenie NCURSES Programming HOWTO: http://alibrus.wordpress.com/how-to/ncurses :)
Zarejestruj się i dołącz do największej społeczności programistów w Polsce.
Otrzymaj wsparcie, dziel się wiedzą i rozwijaj swoje umiejętności z najlepszymi.