|
我在机子上装了stardict窗口版。但在stardict的主页
http://stardict.sourceforge.net/index.php
上看到还有一个命令行版。下载解压后就有这么几个文件:
BUGS dictziplib.h libcore.cpp lib.h test utils.hpp
COPYING distance.cpp libcore.hpp main.cpp TODO
dictziplib.c distance.h lib.cpp Makefile utils.cpp
使用make命令报告错误:
make
g++ -c -g -Wall -O0 -ansi `pkg-config --cflags glib-2.0` -DSTARDICT_DATA_DIR=\""/usr/share/stardict"\" -DHAVE_MMAP -o main.o main.cpp
Package glib-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `glib-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'glib-2.0' found
In file included from main.cpp:18:
libcore.hpp:4:18: glib.h: 没有那个文件或目录
In file included from libcore.hpp:9,
from main.cpp:18:
lib.h:11:18: glib.h: 没有那个文件或目录
In file included from libcore.hpp:9,
from main.cpp:18:
lib.h:15: error: 'glong' is used as a type, but is not defined as a type.
lib.h:16: error: syntax error before `*' token
lib.h:29: error: syntax error before `*' token
lib.h:31: error: syntax error before `*' token
lib.h:36: error: 'gint' is used as a type, but is not defined as a type.
lib.h:42: error: 'glong' is used as a type, but is not defined as a type.
lib.h:43: error: syntax error before `*' token
lib.h:48: error: syntax error before `*' token
lib.h:49: error: syntax error before `*' token
In file included from libcore.hpp:9,
from main.cpp:18:
lib.h:58: error: syntax error before `*' token
lib.h:59: error: 'glong' is used as a type, but is not defined as a type.
In file included from libcore.hpp:9,
from main.cpp:18:
lib.h:62: error: parse error before `[' token
lib.h:63: error: 'glong' is used as a type, but is not defined as a type.
lib.h:64: error: 'glong' is used as a type, but is not defined as a type.
lib.h:66: error: parse error before `char'
lib.h:69: error: parse error before `char'
lib.h:73: error: parse error before `char'
lib.h:74: error: ISO C++ forbids declaration of `glong' with no type
lib.h:74: error: `glong' declared as an `inline' field
lib.h:74: error: parse error before `(' token
lib.h:75: error: ISO C++ forbids defining types within return type
lib.h:75: error: syntax error before `*' token
lib.h:76: error: parse error before `char'
lib.h:77: error: `GPatternSpec' was not declared in this scope
lib.h:77: error: `pspec' was not declared in this scope
lib.h:77: error: `glong' was not declared in this scope
lib.h:77: error: `aIndex' was not declared in this scope
lib.h:77: error: parse error before `)' token
lib.h:78: error: syntax error before `*' token
lib.h:79: error: syntax error before `*' token
lib.h:87: error: 'gint' is used as a type, but is not defined as a type.
lib.h:89: error: `gchar' was not declared in this scope
lib.h:89: error: `dirname' was not declared in this scope
lib.h:89: error: invalid data member initialization
lib.h:89: error: (use `=' to initialize static data members)
lib.h:89: error: variable or field `LoadDir' declared void
lib.h:94: error: parse error before `)' token
lib.h:95: error: syntax error before `*' token
lib.h:96: error: ISO C++ forbids declaration of `gint' with no type
lib.h:96: error: `gint' declared as an `inline' field
lib.h:96: error: parse error before `(' token
lib.h:97: error: ISO C++ forbids defining types within return type
lib.h:97: error: syntax error before `*' token
lib.h:98: error: syntax error before `*' token
lib.h:99: error: syntax error before `*' token
lib.h:100: error: syntax error before `*' token
lib.h:101: error: syntax error before `*' token
lib.h:102: error: parse error before `*' token
lib.h:103: error: parse error before `*' token
lib.h:104: error: parse error before `*' token
lib.h:105: error: `GPatternSpec' was not declared in this scope
lib.h:105: error: `pspec' was not declared in this scope
lib.h:105: error: `glong' was not declared in this scope
lib.h:105: error: `aiIndexes' was not declared in this scope
lib.h:105: error: parse error before `,' token
lib.h:108: error: syntax error before `(' token
In file included from main.cpp:18:
libcore.hpp:41: error: parse error before `*' token
libcore.hpp:44: error: syntax error before `*' token
libcore.hpp:52: error: parse error before `*' token
libcore.hpp:53: error: parse error before `*' token
libcore.hpp:55: error: `gchar' was not declared in this scope
libcore.hpp:55: error: `word' was not declared in this scope
libcore.hpp:55: error: `gchar' was not declared in this scope
libcore.hpp:55: error: `data' was not declared in this scope
libcore.hpp:55: error: parse error before `*' token
In file included from main.cpp:24:
utils.hpp:4:18: glib.h: 没有那个文件或目录
In file included from main.cpp:24:
utils.hpp:6: error: syntax error before `(' token
utils.hpp:7: error: syntax error before `(' token
utils.hpp:8: error: syntax error before `*' token
main.cpp: In function `std: stream& operator<<(std: stream&, PrintUTF8)':
main.cpp:35: error: `gsize' undeclared (first use this function)
main.cpp:35: error: (Each undeclared identifier is reported only once for each
function it appears in.)
main.cpp:35: error: parse error before `,' token
main.cpp:36: error: `GError' undeclared (first use this function)
main.cpp:36: error: `err' undeclared (first use this function)
main.cpp:38: error: `gchar' undeclared (first use this function)
main.cpp:38: error: `res' undeclared (first use this function)
main.cpp:38: error: `bytes_read' undeclared (first use this function)
main.cpp:38: error: `bytes_written' undeclared (first use this function)
main.cpp:38: error: `g_locale_from_utf8' undeclared (first use this function)
main.cpp:41: error: `g_error_free' undeclared (first use this function)
main.cpp:46: error: `g_free' undeclared (first use this function)
main.cpp: In function `void process_phrase(const char*, LibCore&)':
main.cpp:54: error: parse error before `;' token
main.cpp:57: error: `g_locale_to_utf8' undeclared (first use this function)
main.cpp:60: error: `g_error_free' undeclared (first use this function)
main.cpp:68: warning: cannot pass objects of non-POD type `class
std::vector<LibCore::SearchResult, std::allocator<LibCore::SearchResult> >'
through `...'; call will abort at runtime
main.cpp:71: warning: cannot pass objects of non-POD type `class
std::vector<LibCore::SearchResult, std::allocator<LibCore::SearchResult> >'
through `...'; call will abort at runtime
main.cpp:75: warning: cannot pass objects of non-POD type `class
std::vector<LibCore::SearchResult, std::allocator<LibCore::SearchResult> >'
through `...'; call will abort at runtime
main.cpp:105: error: `g_free' undeclared (first use this function)
make: *** [main.o] 错误 1
不知哪位朋友安装过命令行版的stardict,希望您帮我解决这个安装问题。
谢谢 |
|