当前时区为 UTC + 8 小时



发表新帖 回复这个主题  [ 18 篇帖子 ]  前往页数 1, 2  下一页
作者 内容
1 楼 
 文章标题 : 修改星际译王stardict代码,恢复google全文翻译功能(附修改源码)
帖子发表于 : 2009-10-30 13:03 

注册: 2008-09-22 16:01
帖子: 12
送出感谢: 0 次
接收感谢: 0 次
最近又重新回到linux怀抱了。linux 中好用的词典只有星际译王 stardict 了。使用中发现全文翻译google不能用了。我一直都是用google的,用别的很习惯。想修改它的源代码试试,看看能不能解决这个问题,没有想到解决了。
下载stardict 源代码
修改mainwin.cpp中
代码:
static const char *google_fromlangs[] = {N_("Arabic"), N_("Chinese"), N_("Chinese (Simplified)"), N_("Chinese (Traditional)"), N_("English"), N_("French"), N_("German"), N_("Italian"), N_("Japanese"), N_("Korean"), N_("Portuguese"), N_("Russian"), N_("Spanish"), NULL};
static const char *google_arabic_tolangs[] = { N_("English"), NULL };
static const char *google_arabic_code[] = { "ar&tl=en" };
static const char *google_chinese_tolangs[] = { N_("English"), NULL };
static const char *google_chinese_code[] = { "zh-CN&tl=en" };
static const char *google_chinese_simplified_tolangs[] = {N_("Chinese (Traditional)"), N_("English"), NULL };
static const char *google_chinese_simplified_code[] = { "zh-CN&tl=zh-TW", "zh-CN&tl=en" };
static const char *google_chinese_traditional_tolangs[] = {N_("Chinese (Simplified)"), N_("English"), NULL };
static const char *google_chinese_traditional_code[] = { "zh-TW&tl=zh-CN", "zh-TW&tl=en" };
static const char *google_english_tolangs[] = { N_("Arabic"), N_("Chinese (Simplified)"), N_("Chinese (Traditional)"), N_("French"), N_("German"), N_("Italian"), N_("Japanese"), N_("Korean"), N_("Portuguese"), N_("Russian"), N_("Spanish"), NULL };
static const char *google_english_code[] = {"en&tl=ar", "en&tl=zh-CN", "en&tl=zh-TW", "en&tl=fr", "en&tl=de", "en&tl=it", "en&tl=ja", "en&tl=ko", "en&tl=pt", "en&tl=ru", "en&tl=es"};
static const char *google_french_tolangs[] = { N_("English"), N_("German"), NULL };
static const char *google_french_code[] = { "fr&tl=en", "fr&tl=de" };
static const char *google_german_tolangs[] = {N_("English"), N_("French"), NULL};
static const char *google_german_code[] = { "de&tl=en", "de&tl=fr" };
static const char *google_italian_tolangs[] = {N_("English"), NULL};
static const char *google_italian_code[] = { "it&tl=en" };
static const char *google_japanese_tolangs[] = {N_("English"), NULL};
static const char *google_japanese_code[] = { "ja&tl=en" };
static const char *google_korean_tolangs[] = {N_("English"), NULL};
static const char *google_korean_code[] = { "ko&tl=en" };
static const char *google_portuguese_tolangs[] = {N_("English"), NULL};
static const char *google_portuguese_code[] = { "pt&tl=en" };
static const char *google_russian_tolangs[] = {N_("English"), NULL};
static const char *google_russian_code[] = { "ru&tl=en" };
static const char *google_spanish_tolangs[] = {N_("English"), NULL};
static const char *google_spanish_code[] = { "es&tl=en" };
代码:
void TransWin::GetHostFile(std::string &host, std::string &file, const char *text)
{
   gint engine_index = gtk_combo_box_get_active(GTK_COMBO_BOX(engine_combobox));
   if(engine_index==0){
      host = "translate.google.cn";
      file = "/translate_t?prev=hp&hl=zh-CN&js=y&sl=";
   }else if(engine_index==1){
      host = "fanyi.cn.yahoo.com";
      file = "/translate_txt?ei=UTF-8&lp=";
   }else if(engine_index==2){
      host = "babelfish.altavista.com";
      file = "/tr?ienc=utf-8&lp=";
   }else if(engine_index==3){
      host = "www.systranbox.com";
      file = "/systran/box?systran_id=SystranSoft-en&systran_charset=UTF-8&systran_lp=";
   }else if(engine_index==4){
      host = "www.excite.co.jp";
      file = "/world";
   }else if(engine_index==5){
      host = "fy.iciba.com";
      file = "/?langpair=";
   }

   gint fromlang_index = gtk_combo_box_get_active(GTK_COMBO_BOX(fromlang_combobox));
   gint tolang_index = gtk_combo_box_get_active(GTK_COMBO_BOX(tolang_combobox));
   const char *lang_code = trans_engines[engine_index].code[fromlang_index][tolang_index];
   if(engine_index==4){
      if(strcmp(lang_code,"KOJA")==0 || strcmp(lang_code,"JAKO")==0){
         file += "/korean?wb_lp=";
      }else if(strcmp(lang_code,"ENJA")==0 || strcmp(lang_code,"JAEN")==0){
         file += "/english?wb_lp=";
      }else if(strcmp(lang_code,"CHJA")==0 || strcmp(lang_code,"JACH")==0){
         file += "/chinese?wb_lp=";
      }else{
         file += "/english?wb_lp=";
      }
   }
 
   file += lang_code;
   if (engine_index == 0) {
      file += "&text=";
      file += text;
   } else if (engine_index == 1){
      file += "&text=";
      file += text;
   } else if (engine_index == 2){
      file += "&trtext=";
      file += text;
   }else if(engine_index == 3 ){
      file += "&systran_text=";
      file += text;
   }else if(engine_index == 4 ){
      file += "&before=";
      file += text;
   }
}
修改stardict.cpp文件中
代码:
   } else if (engine_index == 0) {
      //#define GoogleTranslateStartMark "<div id=result_box dir=ltr>"
        #define GoogleTranslateStartMark "<textarea name=utrans wrap=SOFT dir=\"ltr\" rows=5 id=suggestion>"
                                //<textarea name=utrans wrap=SOFT dir="ltr" rows=5 id=suggestion>
      char *p = g_strstr_len(buffer, buffer_len, GoogleTranslateStartMark);
      if (p) {
         p += sizeof(GoogleTranslateStartMark) -1;
         char *p2 = g_strstr_len(p, buffer_len - (p - buffer), "</textarea>");
         if (p2) {
            result_text.assign(p, p2-p);
            found = true;
         }
      }
   }

下载修改后的全部源码:
http://www.brsbox.com/filebox/down/fc/86e4548789d625fa5592ffb2abc895a1
下载地址2
http://xiujiecn.qupan.com/5018378.html
如何用gcc/g++编译
代码:
./configure PKG_CONFIG=/usr/bin/pkg-config --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man --disable-gnome-support --disable-schemas-install --disable-espeak --disable-gucharmap --disable-festival --disable-advertisement --disable-updateinfo --disable-spell


make

如何安装
代码:
sudo make install


页首
 用户资料  
 
2 楼 
 文章标题 : Re: 修改星际译王stardict代码,恢复google全文翻译功能(附修改源码)
帖子发表于 : 2009-11-03 22:34 

注册: 2009-06-20 23:53
帖子: 490
送出感谢: 3
接收感谢: 0 次
感谢楼主!不妨提交问题给官方? :em11


页首
 用户资料  
 
3 楼 
 文章标题 : Re: 修改星际译王stardict代码,恢复google全文翻译功能(附修改源码)
帖子发表于 : 2009-11-11 17:18 
头像

注册: 2009-02-14 9:04
帖子: 558
送出感谢: 0 次
接收感谢: 0 次
xiujie 写道:
最近又重新回到linux怀抱了。linux 中好用的词典只有星际译王 stardict 了。使用中发现全文翻译google不能用了。我一直都是用google的,用别的很习惯。想修改它的源代码试试,看看能不能解决这个问题,没有想到解决了。
下载stardict 源代码
修改mainwin.cpp中
代码:
static const char *google_fromlangs[] = {N_("Arabic"), N_("Chinese"), N_("Chinese (Simplified)"), N_("Chinese (Traditional)"), N_("English"), N_("French"), N_("German"), N_("Italian"), N_("Japanese"), N_("Korean"), N_("Portuguese"), N_("Russian"), N_("Spanish"), NULL};
static const char *google_arabic_tolangs[] = { N_("English"), NULL };
static const char *google_arabic_code[] = { "ar&tl=en" };
static const char *google_chinese_tolangs[] = { N_("English"), NULL };
static const char *google_chinese_code[] = { "zh-CN&tl=en" };
static const char *google_chinese_simplified_tolangs[] = {N_("Chinese (Traditional)"), N_("English"), NULL };
static const char *google_chinese_simplified_code[] = { "zh-CN&tl=zh-TW", "zh-CN&tl=en" };
static const char *google_chinese_traditional_tolangs[] = {N_("Chinese (Simplified)"), N_("English"), NULL };
static const char *google_chinese_traditional_code[] = { "zh-TW&tl=zh-CN", "zh-TW&tl=en" };
static const char *google_english_tolangs[] = { N_("Arabic"), N_("Chinese (Simplified)"), N_("Chinese (Traditional)"), N_("French"), N_("German"), N_("Italian"), N_("Japanese"), N_("Korean"), N_("Portuguese"), N_("Russian"), N_("Spanish"), NULL };
static const char *google_english_code[] = {"en&tl=ar", "en&tl=zh-CN", "en&tl=zh-TW", "en&tl=fr", "en&tl=de", "en&tl=it", "en&tl=ja", "en&tl=ko", "en&tl=pt", "en&tl=ru", "en&tl=es"};
static const char *google_french_tolangs[] = { N_("English"), N_("German"), NULL };
static const char *google_french_code[] = { "fr&tl=en", "fr&tl=de" };
static const char *google_german_tolangs[] = {N_("English"), N_("French"), NULL};
static const char *google_german_code[] = { "de&tl=en", "de&tl=fr" };
static const char *google_italian_tolangs[] = {N_("English"), NULL};
static const char *google_italian_code[] = { "it&tl=en" };
static const char *google_japanese_tolangs[] = {N_("English"), NULL};
static const char *google_japanese_code[] = { "ja&tl=en" };
static const char *google_korean_tolangs[] = {N_("English"), NULL};
static const char *google_korean_code[] = { "ko&tl=en" };
static const char *google_portuguese_tolangs[] = {N_("English"), NULL};
static const char *google_portuguese_code[] = { "pt&tl=en" };
static const char *google_russian_tolangs[] = {N_("English"), NULL};
static const char *google_russian_code[] = { "ru&tl=en" };
static const char *google_spanish_tolangs[] = {N_("English"), NULL};
static const char *google_spanish_code[] = { "es&tl=en" };
代码:
void TransWin::GetHostFile(std::string &host, std::string &file, const char *text)
{
   gint engine_index = gtk_combo_box_get_active(GTK_COMBO_BOX(engine_combobox));
   if(engine_index==0){
      host = "translate.google.cn";
      file = "/translate_t?prev=hp&hl=zh-CN&js=y&sl=";
   }else if(engine_index==1){
      host = "fanyi.cn.yahoo.com";
      file = "/translate_txt?ei=UTF-8&lp=";
   }else if(engine_index==2){
      host = "babelfish.altavista.com";
      file = "/tr?ienc=utf-8&lp=";
   }else if(engine_index==3){
      host = "www.systranbox.com";
      file = "/systran/box?systran_id=SystranSoft-en&systran_charset=UTF-8&systran_lp=";
   }else if(engine_index==4){
      host = "www.excite.co.jp";
      file = "/world";
   }else if(engine_index==5){
      host = "fy.iciba.com";
      file = "/?langpair=";
   }

   gint fromlang_index = gtk_combo_box_get_active(GTK_COMBO_BOX(fromlang_combobox));
   gint tolang_index = gtk_combo_box_get_active(GTK_COMBO_BOX(tolang_combobox));
   const char *lang_code = trans_engines[engine_index].code[fromlang_index][tolang_index];
   if(engine_index==4){
      if(strcmp(lang_code,"KOJA")==0 || strcmp(lang_code,"JAKO")==0){
         file += "/korean?wb_lp=";
      }else if(strcmp(lang_code,"ENJA")==0 || strcmp(lang_code,"JAEN")==0){
         file += "/english?wb_lp=";
      }else if(strcmp(lang_code,"CHJA")==0 || strcmp(lang_code,"JACH")==0){
         file += "/chinese?wb_lp=";
      }else{
         file += "/english?wb_lp=";
      }
   }
 
   file += lang_code;
   if (engine_index == 0) {
      file += "&text=";
      file += text;
   } else if (engine_index == 1){
      file += "&text=";
      file += text;
   } else if (engine_index == 2){
      file += "&trtext=";
      file += text;
   }else if(engine_index == 3 ){
      file += "&systran_text=";
      file += text;
   }else if(engine_index == 4 ){
      file += "&before=";
      file += text;
   }
}
修改stardict.cpp文件中
代码:
   } else if (engine_index == 0) {
      //#define GoogleTranslateStartMark "<div id=result_box dir=ltr>"
        #define GoogleTranslateStartMark "<textarea name=utrans wrap=SOFT dir=\"ltr\" rows=5 id=suggestion>"
                                //<textarea name=utrans wrap=SOFT dir="ltr" rows=5 id=suggestion>
      char *p = g_strstr_len(buffer, buffer_len, GoogleTranslateStartMark);
      if (p) {
         p += sizeof(GoogleTranslateStartMark) -1;
         char *p2 = g_strstr_len(p, buffer_len - (p - buffer), "</textarea>");
         if (p2) {
            result_text.assign(p, p2-p);
            found = true;
         }
      }
   }

下载修改后的全部源码:
http://www.brsbox.com/filebox/down/fc/86e4548789d625fa5592ffb2abc895a1
下载地址2
http://xiujiecn.qupan.com/5018378.html
如何用gcc/g++编译
代码:
./configure PKG_CONFIG=/usr/bin/pkg-config --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man --disable-gnome-support --disable-schemas-install --disable-espeak --disable-gucharmap --disable-festival --disable-advertisement --disable-updateinfo --disable-spell


make

如何安装
代码:
sudo make install



下载你的代码后,如何安装?


_________________
ubuntu 小a中文论坛技术版块 http://www.avast1.cn/bbs/forum-80-1.html

我的新浪博客 http://blog.sina.com.cn/xieruibiao


页首
 用户资料  
 
4 楼 
 文章标题 : Re: 修改星际译王stardict代码,恢复google全文翻译功能(附修改源码)
帖子发表于 : 2009-11-11 17:19 
头像

注册: 2009-02-14 9:04
帖子: 558
送出感谢: 0 次
接收感谢: 0 次
xrb2007@xrb2007-laptop:~$ sudo make install
make: *** 没有规则可以创建目标“install”。 停止。
xrb2007@xrb2007-laptop:~$


_________________
ubuntu 小a中文论坛技术版块 http://www.avast1.cn/bbs/forum-80-1.html

我的新浪博客 http://blog.sina.com.cn/xieruibiao


页首
 用户资料  
 
5 楼 
 文章标题 : Re: 修改星际译王stardict代码,恢复google全文翻译功能(附修改源码)
帖子发表于 : 2009-11-11 18:18 
头像

注册: 2009-02-14 9:04
帖子: 558
送出感谢: 0 次
接收感谢: 0 次
:em20 看不懂,搞了下,还是不懂。


_________________
ubuntu 小a中文论坛技术版块 http://www.avast1.cn/bbs/forum-80-1.html

我的新浪博客 http://blog.sina.com.cn/xieruibiao


页首
 用户资料  
 
6 楼 
 文章标题 : Re: 修改星际译王stardict代码,恢复google全文翻译功能(附修改源码)
帖子发表于 : 2009-11-12 14:12 

注册: 2008-09-22 16:01
帖子: 12
送出感谢: 0 次
接收感谢: 0 次
xrb2007 写道:
:em20 看不懂,搞了下,还是不懂。

第一步
./configure PKG_CONFIG=/usr/bin/pkg-config --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man --disable-gnome-support --disable-schemas-install --disable-espeak --disable-gucharmap --disable-festival --disable-advertisement --disable-updateinfo --disable-spell
第二步
make
第三步
sudo make install


页首
 用户资料  
 
7 楼 
 文章标题 : Re: 修改星际译王stardict代码,恢复google全文翻译功能(附修改源码)
帖子发表于 : 2009-11-12 14:34 
头像

注册: 2009-02-14 9:04
帖子: 558
送出感谢: 0 次
接收感谢: 0 次
xrb2007@xrb2007-laptop:~$ stardict-3.0.1_bbs.xiujie.cn
stardict-3.0.1_bbs.xiujie.cn: command not found
xrb2007@xrb2007-laptop:~$ cd stardict-3.0.1_bbs.xiujie.cn
xrb2007@xrb2007-laptop:~/stardict-3.0.1_bbs.xiujie.cn$ ./configure PKG_CONFIG=/usr/bin/pkg-config --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man --disable-gnome-support --disable-schemas-install --disable-espeak --disable-gucharmap --disable-festival --disable-advertisement --disable-updateinfo --disable-spell
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gconftool-2... /usr/bin/gconftool-2
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
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 dependency style of gcc... gcc3
checking for intltool >= 0.22... 0.36.2 found
checking for perl... /usr/bin/perl
checking for XML::Parser... ok
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl.exe... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no
checking dependency style of g++... none
checking for g77... no
checking for xlf... no
checking for f77... no
checking for frt... no
checking for pgf77... no
checking for cf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for xlf90... no
checking for f90... no
checking for pgf90... no
checking for pghpf... no
checking for epcf90... no
checking for gfortran... no
checking for g95... no
checking for xlf95... no
checking for f95... no
checking for fort... no
checking for ifort... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for ftn... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether accepts -g... no
checking the maximum length of command line arguments... 1572864
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating libtool
appending configuration tag "CXX" to libtool
appending configuration tag "F77" to libtool
checking for library containing strerror... none required
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking whether we are using the GNU C++ compiler... (cached) no
checking whether g++ accepts -g... (cached) no
checking dependency style of g++... (cached) none
checking for a BSD-compatible install... /usr/bin/install -c
checking whether make sets $(MAKE)... (cached) yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for getpagesize... no
checking for working mmap... no
checking locale.h usability... no
checking locale.h presence... no
checking for locale.h... no
checking libintl.h usability... no
checking libintl.h presence... no
checking for libintl.h... no
checking for STARDICT... configure: error: Package requirements (gtk+-2.0 >= 2.12 gthread-2.0) were not met:

No package 'gtk+-2.0' found
No package 'gthread-2.0' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables STARDICT_CFLAGS
and STARDICT_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

xrb2007@xrb2007-laptop:~/stardict-3.0.1_bbs.xiujie.cn$ make
make: *** 没有指明目标并且找不到 makefile。 停止。
xrb2007@xrb2007-laptop:~/stardict-3.0.1_bbs.xiujie.cn$ sudo make install
[sudo] password for xrb2007:
make: *** 没有规则可以创建目标“install”。 停止。
xrb2007@xrb2007-laptop:~/stardict-3.0.1_bbs.xiujie.cn$


_________________
ubuntu 小a中文论坛技术版块 http://www.avast1.cn/bbs/forum-80-1.html

我的新浪博客 http://blog.sina.com.cn/xieruibiao


页首
 用户资料  
 
8 楼 
 文章标题 : Re: 修改星际译王stardict代码,恢复google全文翻译功能(附修改源码)
帖子发表于 : 2009-11-12 14:41 
头像

注册: 2007-06-13 15:57
帖子: 12567
地址: 在他乡
送出感谢: 50
接收感谢: 87
有没有人打包?


页首
 用户资料  
 
9 楼 
 文章标题 : Re: 修改星际译王stardict代码,恢复google全文翻译功能(附修改源码)
帖子发表于 : 2009-11-12 17:09 
头像

注册: 2009-02-14 9:04
帖子: 558
送出感谢: 0 次
接收感谢: 0 次
daf3707 写道:
有没有人打包?



:em05 也是我的心里话。


_________________
ubuntu 小a中文论坛技术版块 http://www.avast1.cn/bbs/forum-80-1.html

我的新浪博客 http://blog.sina.com.cn/xieruibiao


页首
 用户资料  
 
10 楼 
 文章标题 : Re: 修改星际译王stardict代码,恢复google全文翻译功能(附修改源码)
帖子发表于 : 2009-11-18 11:10 

注册: 2009-07-13 10:46
帖子: 2
送出感谢: 0 次
接收感谢: 0 次
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gconftool-2... /usr/bin/gconftool-2
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
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 dependency style of gcc... gcc3
checking for intltool >= 0.22... 0.36.2 found
checking for perl... /usr/bin/perl
checking for XML::Parser... ok
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for g77... no
checking for xlf... no
checking for f77... no
checking for frt... no
checking for pgf77... no
checking for cf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for xlf90... no
checking for f90... no
checking for pgf90... no
checking for pghpf... no
checking for epcf90... no
checking for gfortran... no
checking for g95... no
checking for xlf95... no
checking for f95... no
checking for fort... no
checking for ifort... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for ftn... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether accepts -g... no
checking the maximum length of command line arguments... 1572864
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
checking for library containing strerror... none required
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking dependency style of g++... (cached) gcc3
checking for a BSD-compatible install... /usr/bin/install -c
checking whether make sets $(MAKE)... (cached) yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for getpagesize... yes
checking for working mmap... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking for LC_MESSAGES... yes
checking libintl.h usability... yes
checking libintl.h presence... yes
checking for libintl.h... yes
checking for ngettext in libc... yes
checking for dgettext in libc... yes
checking for bind_textdomain_codeset... yes
checking for msgfmt... no
checking for STARDICT... configure: error: Package requirements (gtk+-2.0 >= 2.12 gthread-2.0) were not met:

No package 'gtk+-2.0' found
No package 'gthread-2.0' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables STARDICT_CFLAGS
and STARDICT_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

还请高手帮忙解决以上问题,感谢!


页首
 用户资料  
 
11 楼 
 文章标题 : Re: 修改星际译王stardict代码,恢复google全文翻译功能(附修改源码)
帖子发表于 : 2009-11-18 14:05 
头像

注册: 2008-07-21 9:44
帖子: 2371
地址: 深圳
送出感谢: 0 次
接收感谢: 0 次
回10楼,估计是你的系统上缺少gtk相关的库文件,把gtk库安装上去再编译安装试试
代码:
sudo apt-get install libgtk2.0-dev


_________________

My blog


页首
 用户资料  
 
12 楼 
 文章标题 : Re: 修改星际译王stardict代码,恢复google全文翻译功能(附修改源码)
帖子发表于 : 2009-11-18 15:45 
头像

注册: 2009-11-16 0:30
帖子: 328
地址: sh
送出感谢: 0 次
接收感谢: 0 次
谢谢了,下下来试试看了!!


_________________
只有历经,才能懂得!!


页首
 用户资料  
 
13 楼 
 文章标题 : Re: 修改星际译王stardict代码,恢复google全文翻译功能(附修改源码)
帖子发表于 : 2009-11-20 9:44 

注册: 2009-07-13 10:46
帖子: 2
送出感谢: 0 次
接收感谢: 0 次
已经成功安装,可GOOGLE全文还是不能链接?????


页首
 用户资料  
 
14 楼 
 文章标题 : Re: 修改星际译王stardict代码,恢复google全文翻译功能(附修改源码)
帖子发表于 : 2009-11-20 11:21 
头像

注册: 2009-02-14 9:04
帖子: 558
送出感谢: 0 次
接收感谢: 0 次
yangyang22 写道:
已经成功安装,可GOOGLE全文还是不能链接?????



google翻译的网页又改版了,是不是因为这个原因呢?


_________________
ubuntu 小a中文论坛技术版块 http://www.avast1.cn/bbs/forum-80-1.html

我的新浪博客 http://blog.sina.com.cn/xieruibiao


页首
 用户资料  
 
15 楼 
 文章标题 : Re: 修改星际译王stardict代码,恢复google全文翻译功能(附修改源码)
帖子发表于 : 2009-11-20 11:32 
头像

注册: 2009-11-03 16:24
帖子: 908
送出感谢: 0 次
接收感谢: 0 次
10楼的编译出错,明显是缺少东西嘛。


_________________
OMG, this is a signature!—_—|
FollowMe......


页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 18 篇帖子 ]  前往页数 1, 2  下一页

当前时区为 UTC + 8 小时


在线用户

正在浏览此版面的用户:没有注册用户 和 1 位游客


不能 在这个版面发表主题
不能 在这个版面回复主题
不能 在这个版面编辑帖子
不能 在这个版面删除帖子
不能 在这个版面提交附件

前往 :  
本站点为公益性站点,用于推广开源自由软件,由 DiaHosting VPSBudgetVM VPS 提供服务。
我们认为:软件应可免费取得,软件工具在各种语言环境下皆可使用,且不会有任何功能上的差异;
人们应有定制和修改软件的自由,且方式不受限制,只要他们自认为合适。

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
简体中文语系由 王笑宇 翻译