编译vim时无法链接ncurses [英] Cannot link ncurses while compiling vim
问题描述
我正在尝试在主目录中编译vim 7.3.作为终端库,我使用--with-shared选项在〜/lib/ncurses/ncurses-5.9中安装了ncurses.
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.
设置后
set path = ( ~/lib/ncurses/ncurses-5.9/bin/ $path )
setenv LD_LIBRARY_PATH ~/lib/ncurses/ncurses-5.9/lib/:$LD_LIBRARY_PATH
我尝试使用
./configure --enable-multibyte --prefix=/home/******/apps/vim/vim73
或
./configure --enable-multibyte --prefix=/home/******/apps/vim/vim73 --with-tlib=ncurses
但是在搜索ncurses时失败.似乎-inccurses标志不可用,而ldconfig没有帮助.
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?
推荐答案
LD_LIBRARY_PATH在运行时未编译时用于查找正确的库.您需要设置LDFLAGS或设置一个configure选项来找到ncurses库:
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 ...
这篇关于编译vim时无法链接ncurses的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!