-
-
Save cnruby/960344 to your computer and use it in GitHub Desktop.
$ curl -O ftp://ftp.gnu.org/gnu/ncurses/ncurses-5.9.tar.gz | |
$ tar -xzvf ncurses-5.9.tar.gz | |
$ cd ./ncurses-5.9 | |
$ ./configure --prefix=/usr/local \ | |
--without-cxx --without-cxx-binding --without-ada --without-progs --without-curses-h \ | |
--with-shared --without-debug \ | |
--enable-widec --enable-const --enable-ext-colors --enable-sigwinch --enable-wgetch-events \ | |
&& make | |
$ sudo make install |
I am getting the following error on running the ./configure :
ld: can't write output file: ../lib/libpanelw.6.dylib for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [../lib/libpanelw.6.dylib] Error 1
make: *** [all] Error 2
The detailed output can be seen here : http://pastebin.com/Z7sZgdUL
Can someone point out how I can rectify this?
I was able to install it from brew (brew install ncurses
).
I believe now it is
$brew install homebrew/dupes/ncurses
hi guys, I am trying creates a simple app with ncurses library, but I'm not getting success, this is message of error:
Undefined symbols for architecture x86_64:
"_endwin", referenced from:
sair() in ncurses-45d10a.o
"_init_pair", referenced from:
_main in ncurses-45d10a.o
"_initscr", referenced from:
_main in ncurses-45d10a.o
"_move", referenced from:
_main in ncurses-45d10a.o
"_printw", referenced from:
_main in ncurses-45d10a.o
"_refresh", referenced from:
_main in ncurses-45d10a.o
"_start_color", referenced from:
_main in ncurses-45d10a.o
"_stdscr", referenced from:
_main in ncurses-45d10a.o
"_wattr_off", referenced from:
_main in ncurses-45d10a.o
"_wattr_on", referenced from:
_main in ncurses-45d10a.o
"_wbkgd", referenced from:
_main in ncurses-45d10a.o
"_wgetch", referenced from:
_main in ncurses-45d10a.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
anybody can help me ?
Installing it via brew works fine for me: $brew install homebrew/dupes/ncurses
If you want to install homebrew, try this: /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Linker issues mean that you didn't invoke -lncurses when compiling. ncurses requires this, as well as other ncurses libs, i.e. to compile a c file using ncurses and the ncurses' 'form' lib you'd use: gcc -o -lform -lncurses [file] [name]
If using xcode the linker options are buried under project->build settings->all->other linker flags.
If you came here looking for libncurses.5.4.dylib
(for example because Wine whined): see my answer on superuser.
tl;dr: brew doesn't have a version that old, macports does (but it won't compile). compile it instead from the tarballs that Apple releases of macOS open source code.
How to you install it on linux though. I can't seem to be able to create the symbolic links.
brew install ncurses
works as of Jan 27 2020
@Birch-san
It works! Thanks!
brew install ncurses
works as of April 1 2020
brew install ncurses
works as of April 1 2020
Hi! I'm a newbie, I don't understand... I have to put 'brew install ncurses' on my terminal?
@ catahache, you probably don't have to, but you can use this command to install ncurses on a mac
@ catahache, you probably don't have to, but you can use this command to install ncurses on a mac
Thank you! and how do I make that code blocks reads it or how can I use it on code blocks later?
Can someone please tell how to make the ncurses library installed from brew to a project? I have set the following environment variables as my CPPFLAGS and LDFLAGS but it does not help.
CPPFLAGS=-I/usr/local/opt/ruby/include -I/usr/local/opt/ncurses/include -I/usr/local/opt/ncurses/include -I/usr/local/opt/qt/include
LDFLAGS=-L/usr/local/opt/ruby/lib -L/usr/local/opt/ncurses/lib -lncurses -L/usr/local/opt/qt/lib
@catahache
Add #include <curses.h> at the top of your file.
@catahache
Add #include <curses.h> at the top of your file.
Thank you, I have some weird things going on... When I run the program on eclipse, some weird characters appears between, and I cannot make it function. When I try to run it on the macosx terminal, it doesn't load. But also it gives me no error.
I'm really new into programming, so maybe I need to set something or idk... I don't know how to set, for example, enviroment variables to set the TERM. Can somebody maybe help me? :( I'm going on for a week trying to solve this problem hahaha
Hello,
Today I ran into the same problem and after looking at the responses and trying almost everything, I keep running into the same problem. brew install ncurses may work fine for some, but does anyone have any other ideas I could try. Would be highly appreciated.
Hello,
Today I ran into the same problem and after looking at the responses and trying almost everything, I keep running into the same problem. brew install ncurses may work fine for some, but does anyone have any other ideas I could try. Would be highly appreciated.
Sadly, I couldn't solve it :(
hi guys
I have a problem like this...
I tried "sudo make install"
"? tic could not build /usr/local/share/terminfo
make[1]: *** [install.data] Error 1
make: *** [install] Error 2"
how can i solve it?....
hi guys
I have a problem like this...
I tried "sudo make install"
"? tic could not build /usr/local/share/terminfo
make[1]: *** [install.data] Error 1
make: *** [install] Error 2"
how can i solve it?....
i solved it like this
$./configure
$make
& sudo make install
It's probably already installed as osx uses it. Just tell gcc to link to it: gcc -lncurses ...
I could get the build to work. But canto ( a text based rss reader) was always giving a Segmentation fault with the compiled ncurses.