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] = key.data(); <= 変更前
↓
keys[size] = (char*)key.data(); <= 変更後
Upon making these edits, run configure and do the normal make && make install dance. You should be good to go.
Subject:[#38758] RE: I got some problem with compiling in linux
Date:2008-09-08 22:45By:Brooke M. Fujita (sapporo_geek)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: http://quruli.ivory.ne.jp/diary/?date=20080423. 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] = key.data(); <= 変更前
↓
keys[size] = (char*)key.data(); <= 変更後
Upon making these edits, run configure and do the normal make && make install dance. You should be good to go.
Aloha!
//Brooke