最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【记录】尝试把w3m添加到MingW中

MingW crifan 2732浏览 0评论

折腾

【记录】将Cygwin中的Docbook开发环境,整合到MingW中的MSYS中

的过程中,需要把w3m添加到MingW,使得可以正常从docbook输出txt。

现在记录折腾过程。


1.第一反应肯定是,去MingW项目中,看看是否已有w3m。

去mingw主页Home搜w3m,也没搜到任何资料。

http://sourceforge.net/projects/mingw/files/找了找,找了半天也没找到任何有关w3m的。

2.看来,只能去w3m主页看看了。

去下载最新版本的源码:w3m-0.5.3.tar.gz

3.本来打算去尝试编译w3m源码的。不过编译之前,突然想到了,之前的cygwin还在,去看看其中的w3m,结果果真在bin下面发现了w3m.exe和w3mman。

然后就尝试,把这两个文件拷贝到MinGW\bin下面,然后看看是否可以运行w3m。

结果无法运行,缺少dll库:

w3m lack cygcrypto dll

4.所以还是老老实实地去尝试编译w3m吧。

现在就是想办法,把w3m-0.5.3.tar.gz解压后得到的源码,在mingw下面编译出来,生成w3m.exe供使用。

然后就去找,如何在mingw下面编译第三发程序。

找到:

Installation using MinGW

看到其中的:

mingw-get install libz

突然想起来,是不是此处也可以直接在mingw下面如此去安装w3m,所以去试试:

Administrator@NYBDHB7EB3XEHP6 /e/Dev_Root/docbook/dev/books/docbook_dev_note/src
$ mingw-get.exe install w3m
mingw-get.exe: *** ERROR *** w3m: unknown package

很明显,此处无法识别w3m,看来是官网的库中,没有包含w3m。

看来还是需要自己去手动从源码编译。

5.切换到E:\Dev_Tools\w3m\w3m-0.5.3下面,然后尝试去编译源码,看看结果如何。

虽然试了试./configure help,结果出错:

Administrator@NYBDHB7EB3XEHP6 /e/Dev_Tools/w3m/w3m-0.5.3
$ ./configure help
configure: WARNING: you should use --build, --host, --target
checking for help-g++... no
checking for help-c++... no
checking for help-gpp... no
checking for help-aCC... no
checking for help-CC... no
checking for help-cxx... no
checking for help-cc++... no
checking for help-cl.exe... no
checking for help-FCC... no
checking for help-KCC... no
checking for help-RCC... no
checking for help-xlC_r... no
checking for help-xlC... no
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for gawk... gawk
checking for help-gcc... no
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for a BSD-compatible install... /bin/install -c
checking whether ln -s works... no, using cp -p
checking whether make sets $(MAKE)... yes
checking for help-ranlib... no
checking for ranlib... ranlib
checking for perl... /bin/perl
checking for nkf... no
checking for man... no
checking build system type... Invalid configuration `help': machine `help' not recognized
configure: error: /bin/sh ./config.sub help failed

6. 然后重新去./configure。但在./configure时出错,具体折腾过程参见:

【已解决】MingW下,w3m-0.5.3中./configure时出错:configure: error: gc.h not found

7. 然后就是去参考E:\Dev_Tools\w3m\w3m-0.5.3\doc\README中的:

– Run configure.

  % ./configure

– do make

  % make

– do make install

  # make install

接着去make,结果又出错了,具体折腾过程参见:

【未解决】MingW下,make编译w3m出错:main.c:836:23: error: void value not ignored as it ought to be,warning: passing argument 1 of ‘wtf_parse1′ from incompatible pointer type [enabled by default],./libwc/wtf.h:71:19: note: expected ‘wc_uchar **’ but argument is of type ‘char **’

 

【总结】

暂时没搞定,没法把w3m集成到MingW中。

转载请注明:在路上 » 【记录】尝试把w3m添加到MingW中

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
85 queries in 0.153 seconds, using 22.30MB memory