Search code examples
vimncurses

Cannot link ncurses while compiling vim


I'm trying to compile vim 7.3 in home directory. As a terminal library, I installed ncurses in ~/lib/ncurses/ncurses-5.9 with --with-shared option.

After setting

set path = ( ~/lib/ncurses/ncurses-5.9/bin/ $path ) 
setenv LD_LIBRARY_PATH ~/lib/ncurses/ncurses-5.9/lib/:$LD_LIBRARY_PATH

I tried to configure vim with

./configure --enable-multibyte --prefix=/home/******/apps/vim/vim73

or

./configure --enable-multibyte --prefix=/home/******/apps/vim/vim73 --with-tlib=ncurses

however it failes while searching for ncurses. It seems -lncurses flag is unavailable, and ldconfig did not help.

I do not see what I did wrong... can anybody help me?


Solution

  • LD_LIBRARY_PATH is used at runtime not compile time to find the correct libraries. You need to set LDFLAGS or set a configure option to find the ncurses library:

    env LDFLAGS=-L<PATH TO NCURSES LIB> ./configure ...