linux编译image,CxImage Linux 编译

CxImage是一个丰富的图像上树立开源代码,Windows下编译简单,但是Linux下有很多问题,特此记录,其中部分问题和解决方法采用前辈的想法,在此一并谢过。

1. 下载Linux的cxp_w_picpath tar包

cxp_w_picpath 主页

Linux 包下载地址

2、下载后得到cxp_w_picpath599c_tar.zip,然后将其解压unzip cxp_w_picpath599c_tar.zip

tar xzvf cxp_w_picpath599c.tar.gz

cd cxp_w_picpath599c/

3、 ./configure; make

其中make时报错:cd . && /home/zhl/cxp_w_picpath599c/admin/missing aclocal-1.4

WARNING: `aclocal-1.4' is needed, and you do not seem to have it handy on your

system.  You might have modified some files without having the

proper tools for further handling them.  Check the `README' file,

it often tells you about the needed prerequirements for installing

this package.  You may also peek at any GNU archive site, in case

some other package would contain this missing `aclocal-1.4' program.

make: *** [aclocal.m4] Error 1

系统有安装高版本的automake,难道一定要切换到低版本?rpm -aq | grep automake

automake-1.13.4-3.el7.noarch

尝试手动修改Makefile里面aclocal的版本号,仍然有问题。最后发现重新生成 aclocal.m4和Makefile就可以了:

解决步骤如下:#重新生成 aclocal.m4

aclocal

#重新生成configure文件

autoconf -i -v -f

# 删除原来的makefile

find ./ -name Makefile -exec rm -rf {} \;

# 重新生成Makefile

./configure

出现如下错误:configure.in:98: warning: omit leading './' from config file names such as './Makefile';

configure.in:98: remake rules might be subtly broken otherwise

configure.in:62: error: required file 'admin/compile' not found

configure.in:62:   'automake --add-missing' can install 'compile'

make: *** [Makefile.in] Error 1

解决方法:automake --add-missing

make

4. 出现如下错误tif_xfile.cpp: In function ‘TIFF* _TIFFOpenEx(CxFile*, const char*)’:

tif_xfile.cpp:102: error: cast from ‘CxFile*’ to ‘int’ loses precision

make[3]: *** [tif_xfile.o] Error 1解决方法:修改代码 ./cxp_w_picpath/CxImage/tif_xfile.cpp

extern"C"TIFF* _TIFFOpenEx(CxFile* stream, constchar* mode){

//return (_TIFFFdOpen((int)stream, "TIFF IMAGE", mode));// 64bits 系统,int 改成long

return(_TIFFFdOpen((long)stream,"TIFF IMAGE", mode));

}

5. 采用vi编辑,结束采用:x

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值