emacs 26.1 win7里 sdcv无法显示查询结果了,求助高手

或者你私信我你的邮箱,我把我编译的binary发给你,你看看能不能用

$ cmake c:/sdcv/sdcv-0.5.2
-- The C compiler identification is GNU 7.3.0
-- The CXX compiler identification is GNU 7.3.0
-- Check for working C compiler: /usr/bin/cc.exe
-- Check for working C compiler: /usr/bin/cc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++.exe
-- Check for working CXX compiler: /usr/bin/c++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CXX_SUPPORTS_CXX11
-- Performing Test CXX_SUPPORTS_CXX11 - Success
-- Found ZLIB: /usr/lib/libz.dll.a (found version "1.2.11")
-- Found PkgConfig: /usr/bin/pkg-config.exe (found version "0.29.2")
-- Checking for one of the modules 'glib-2.0'
-- Found GLib2: glib-2.0;intl;pcre;intl;iconv;pcre /usr/include/glib-2.0;/usr/li                                                                                                                b/glib-2.0/include
-- Looking for include file glib/gregex.h
-- Looking for include file glib/gregex.h - not found
-- REQUIRED_VARS
CMake Error: File c:/sdcv/sdcv-0.5.2/c:/sdcv/sdcv-0.5.2/cmake/FindGettextTools/c                                                                                                                onfig.cmake.in does not exist.
CMake Error at c:/sdcv/sdcv-0.5.2/cmake/FindGettextTools.cmake:137 (CONFIGURE_FI                                                                                                                LE):
  CONFIGURE_FILE Problem configuring file
Call Stack (most recent call first):
  c:/sdcv/sdcv-0.5.2/CMakeLists.txt:68 (gettext_make_target)


-- Looking for mmap
-- Looking for mmap - found
-- Looking for locale.h
-- Looking for locale.h - found
CMake Error: File c:/sdcv/sdcv-0.5.2/c:/sdcv/sdcv-0.5.2/config.h.cmake does not                                                                                                                 exist.
CMake Error at c:/sdcv/sdcv-0.5.2/CMakeLists.txt:86 (configure_file):
  configure_file Problem configuring file


-- Configuring incomplete, errors occurred!
See also "/c/sdcv/build-sdcv/CMakeFiles/CMakeOutput.log".
See also "/c/sdcv/build-sdcv/CMakeFiles/CMakeError.log".

这是gettext的

$ pacman -Ss gettext
mingw32/mingw-w64-i686-gettext 0.19.8.1-4
    GNU internationalization library (mingw-w64)
mingw32/mingw-w64-i686-ki18n-qt5 5.42.0-1 (kf5)
    KDE Gettext-based UI text internationalization (mingw-w64-qt5)
mingw64/mingw-w64-x86_64-gettext 0.19.8.1-4 [已安装]
    GNU internationalization library (mingw-w64)
mingw64/mingw-w64-x86_64-ki18n-qt5 5.42.0-1 (kf5)
    KDE Gettext-based UI text internationalization (mingw-w64-qt5)
msys/gettext 0.19.8.1-1 (base-devel) [已安装]
    GNU internationalization library
msys/gettext-devel 0.19.8.1-1 (development base-devel) [已安装]
    GNU Internationalization development utilities
msys/libgettextpo 0.19.8.1-1 (libraries) [已安装]
    GNU Internationalization runtime library
msys/perl-Locale-Gettext 1.07-2 (perl-modules) [已安装]
    Permits access from Perl to the gettext() family of functions
msys/po4a 0.53-1
    The po4a (PO for anything) project goal is to ease translations (and more interestingly, the maintenance of translations) using gettext tools on areas where they were not expected like
    documentation

这是我一开始用 mingw64 编译的

$ cmake -G "MinGW Makefiles" -DCMAKE_SH="CMAKE_SH-NOTFOUND" ../sdcv-0.5.2
-- The C compiler identification is GNU 7.3.0
-- The CXX compiler identification is GNU 7.3.0
-- Check for working C compiler: C:/msys64/mingw64/bin/gcc.exe
-- Check for working C compiler: C:/msys64/mingw64/bin/gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/msys64/mingw64/bin/g++.exe
-- Check for working CXX compiler: C:/msys64/mingw64/bin/g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CXX_SUPPORTS_CXX11
-- Performing Test CXX_SUPPORTS_CXX11 - Success
-- Found ZLIB: C:/msys64/mingw64/lib/libz.dll.a (found version "1.2.11")
-- Found PkgConfig: C:/msys64/mingw64/bin/pkg-config.exe (found version "0.29.2")
-- Checking for one of the modules 'glib-2.0'
-- Found GLib2: glib-2.0;intl C:/msys64/mingw64/include/glib-2.0;C:/msys64/mingw64/lib/glib-2.0/include;C:/msys64/mingw64/include
-- Looking for include file glib/gregex.h
-- Looking for include file glib/gregex.h - not found
-- REQUIRED_VARS
-- Looking for mmap
-- Looking for mmap - not found
-- Looking for locale.h
-- Looking for locale.h - found
-- Configuring done
-- Generating done
-- Build files have been written to: D:/James/Work/build-sdcv

稍等一下,我再运行一下 msys 的看看

$ cmake ../sdcv-0.5.2
-- The C compiler identification is GNU 7.3.0
-- The CXX compiler identification is GNU 7.3.0
-- Check for working C compiler: /usr/bin/cc.exe
-- Check for working C compiler: /usr/bin/cc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++.exe
-- Check for working CXX compiler: /usr/bin/c++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CXX_SUPPORTS_CXX11
-- Performing Test CXX_SUPPORTS_CXX11 - Success
-- Found ZLIB: /usr/lib/libz.dll.a (found version "1.2.11")
-- Found PkgConfig: /usr/bin/pkg-config.exe (found version "0.29.2")
-- Checking for one of the modules 'glib-2.0'
-- Found GLib2: glib-2.0;intl;pcre;intl;iconv;pcre /usr/include/glib-2.0;/usr/lib/glib-2.0/include
-- Looking for include file glib/gregex.h
-- Looking for include file glib/gregex.h - not found
-- REQUIRED_VARS
-- Looking for mmap
-- Looking for mmap - found
-- Looking for locale.h
-- Looking for locale.h - found
-- Configuring done
-- Generating done
-- Build files have been written to: /d/James/Work/build-sdcv

我的没有问题,你应该还是某个依赖没有解决

另外 cmake 怎么不用相对路径?把 C:/去掉看看

1 个赞

用这个相对路径就行,不能用绝对路径

现在可以了

:tada:

windows 路径 linux 不认的,mingw 可以,msys 不可以

1 个赞

我知道 mdx 比 sdcv 好在哪了——能查搭配,sdcv 只能查单词

sdcv 也能查词组的,乌龙了,请无视我吧

请教一下如何在msys2下编译sdcv,我折腾了很久也没找到头绪?按照下面这篇文章的做法,下载了sdcv-0.4.2-1.tar.bz2后也不知道该怎么做了https://www.cnblogs.com/bamanzi/archive/2011/06/26/emacs-stardict.html

忘记了,我又滚回linux了 :joy:

我感觉谷歌翻译就不错啊,还支持多国语言

https://github.com/yygcode/sdcv 这个fork可以在cygwin64下编译成功

请问大佬goldendict有命令行吗?在mac下,没有找到呢。

Mac下我就不知道了。应该有的吧。

网上找了没找到,emacs运行M-x goldendict-dwim ,提示「 No such file or directory, goldendict」,看来是没有。

你find一下就是了

find 文件能找到GoldenDict.app,也只有这个可执行。

请问 https://github.com/stardiviner/goldendict.el 在mac下能用吗?谢谢!

可以使用我的 GitHub - manateelazycat/sdcv: Emacs interface for sdcv (Stardict console version)

1 个赞

哇,懒猫大侠,谢谢。

字典文件不匹配啊,找不到相应的星际译王字典。goldendict匹配的字典格式多。

繁体字的《教育部国语辞典》《教育部异体字字典》《康熙字典》《说文解字》。

看readme啊,readme有星际译王词典下载链接

星际译王的词典网站上,没有这几个词典。其他网站也找不到。

如:繁体字版的《教育部国语辞典》《教育部异体字字典》《康熙字典》《说文解字》。