在Ubuntu下装sourcenavigator6.0

本文记录了解决sourcenav-6.0编译过程中出现的Xlib.h文件缺失及编译错误的过程。通过安装libx11-dev包解决了Xlib.h缺失的问题,并修复了tk.h中出现的编译错误。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

下了源代码包

解压 tar zxvf  sourcenav-6.0.tar.gz

cd sourcenav-6.0

sudo ./configure  prefix=/opt/Program/sourcenav6

make

出错,如下

In file included from /opt/software/sourcenav-6.0/tk/unix/../generic/tkInt.h:21,
                 from /opt/software/sourcenav-6.0/tk/unix/../generic/tk3d.h:18,
                 from /opt/software/sourcenav-6.0/tk/unix/../generic/tk3d.c:16:
/opt/software/sourcenav-6.0/tk/unix/../generic/tk.h:83:23: error: X11/Xlib.h: 没有该文件或目录
In file included from /opt/software/sourcenav-6.0/tk/unix/../generic/tkInt.h:21,
                 from /opt/software/sourcenav-6.0/tk/unix/../generic/tk3d.h:18,
                 from /opt/software/sourcenav-6.0/tk/unix/../generic/tk3d.c:16:
/opt/software/sourcenav-6.0/tk/unix/../generic/tk.h:585: 错误: expected specifier-qualifier-list before ‘Bool’
/opt/software/sourcenav-6.0/tk/unix/../generic/tk.h:601: 错误: expected specifier-qualifier-list before ‘Bool’
/opt/software/sourcenav-6.0/tk/unix/../generic/tk.h:661: 错误: expected specifier-qualifier-list before ‘Display’
/opt/software/sourcenav-6.0/tk/unix/../generic/tk.h:789: 错误: expected declaration specifiers or ‘...’ before ‘XPoint’
/opt/software/sourcenav-6.0/tk/unix/../generic/tk.h:890: 错误: expected declaration specifiers or ‘...’ before ‘Display’
/opt/software/sourcenav-6.0/tk/unix/../generic/tk.h:892: 错误: expected declaration specifiers or ‘...’ before ‘Display’
/opt/software/sourcenav-6.0/tk/unix/../generic/tk.h:892: 错误: expected declaration specifiers or ‘...’ before ‘Drawable’

...............

..............

在sogou上查了Xlib.h: 没有该文件或目录

说是缺少libx11-dev包,通过"新立得软件包管理器"搜libx11-dev,下载................

再接着make,成功

然后

make -install

一切都美好了............哈哈

不过通过新立德下载libx11-dev时,想通过ubutun的dvd搜索,虽然找到了,但是会报hash错误,把md5一算,靠,dvd居然下烂了.........

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值