Kingate代理软件安装
Kingate代理软件安装
Kingate代理软件安装
wget http://iweb.dl.sourceforge.net/project/kingate/kingate/1.6-pre2/kingate-1.6-pre2.tar.gz
tar zxvf kingate-1.6-pre2.tar.gz
cd kingate-1.6-pre2
./configure --prefix=/usr/local/kingate1.6
make
出现第一个错
In file included from KConfig.cpp:9:
KConfig.h:52: 错误:有多余的限定‘KConfig::’在成员‘GetList’上
make[2]: *** [KConfig.o] 错误 1
解决方法
vi src/KConfig.h 找到52行
把bool KConfig::GetList(const char *filename);改为
bool GetList(const char *filename);
出现第二个错误
In file included from ftp.cpp:9:
KUser.h:86: 错误:有多余的限定‘KUser::’在成员‘ListLoginUser’上
make[2]: *** [ftp.o] 错误 1
解决方法
src/KUser.h的第86行,由
std::string KUser::ListLoginUser();改为
std::string ListLoginUser();
第三个错误
allow_connect.cpp:44: 错误:从‘const char’到‘int’的转换损失精度
allow_connect.cpp:66: 错误:从‘const char’到‘int’的转换损失精度
分别把44 和 66行的(int)改成(long)就没问题了
出现第四个错误
KDnsCache.cpp:43: 错误:‘strlen’在此作用域中尚未声明
解决方法
vi src/KDnsCache.cpp
在头部加入#include
出现第五个错误
KThreadPool.cpp:55: 错误:从‘void’到‘int’的转换损失精度
KThreadPool.cpp:83: 错误:从‘void’到‘int’的转换损失精度
解决办法
vi src/KThreadPool.cpp 把55和83行的 int换成long
出现第六个错误
mysocket.cpp:617: 错误:‘malloc’在此作用域中尚未声明
mysocket.cpp:621: 错误:‘free’在此作用域中尚未声明
解决办法
vi src/mysocket.cpp
在头部添加#include
到这里应该没有错误的了
可能还会出现警告:不建议使用从字符串常量到‘char*’的转换这样的问题
这个不要管 一般警告不用管
接下来make就不会有问题了
最后make install