Cannot link ncurses while compiling vim

馋奶兔 提交于 2019-12-07 08:13:45

问题


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?


回答1:


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 ...



回答2:


Install the ncurses-devel package

$ yum install ncurses-devel

Then try again:

$ ./configure <your options>


来源:https://stackoverflow.com/questions/8834438/cannot-link-ncurses-while-compiling-vim

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!