Foren: Hilfe (Thread #19628)

I got some problem with compiling in linux (2008-08-18 23:14 by kiko555 #38306)

I had installed the darts-0.32 before make chasen 2.4.0

But I got the error message :
dartsdic.cpp: In function `int da_build_dump(da_build_t*, char*, FILE*)':
dartsdic.cpp:199: error: invalid conversion from `char**' to `const char**'
dartsdic.cpp:199: error: initializing argument 2 of `int
Darts::DoubleArrayImpl<node_type_, node_u_type_, array_type_, array_u_type_,
length_func_>::build(unsigned int, const node_type_**, const size_t*, const
array_type_*, int (*)(unsigned int, unsigned int)) [with node_type_ = char,
node_u_type_ = unsigned char, array_type_ = long int, array_u_type_ = long
unsigned int, length_func_ = Darts::Length<char>]'
make[2]: *** [dartsdic.lo] Error 1
make[2]: Leaving directory `/home/kiko/master/chasen/chasen-2.4.0/lib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/kiko/master/chasen/chasen-2.4.0'
make: *** [all] Error 2

Anyone know how to solve?

RE: I got some problem with compiling in linux (2008-09-08 22:45 by sapporo_geek #38758)

I am messing about with chasen 2.3.3 and darts 0.32 per ソースからインストール page on the Chasen Wiki (

I ran into similar problems, and looking at the above error message, I think I can point you in the right direction.

I found a write-up on this issue in several places, you might want to look here: You need to make the following three edits:

In essence, before configuring chasen to use darts, you need to edit lib/dartsdic.cpp in your install directory for chasen.

1. Near line 71: change function call "setArray" to "set_array"
darts->setArray(cha_mmap_map(da->da_mmap)); <= 変更前

darts->set_array(cha_mmap_map(da->da_mmap)); <= 変更後

2. Near line 164: use const char** and const char*
char** keys = new char*[entries->size()]; <= 変更前

const char** keys = new const char*[entries->size()]; <= 変更後

3. Near 181: in relation to the edit 2. above,
change the pointer casts.
(const char*)keys[size] =; <= 変更前

keys[size] = (char*); <= 変更後

Upon making these edits, run configure and do the normal make && make install dance. You should be good to go.

Reply to #38306