Wednesday, November 6, 2013

Fix Yamacha installation errors

1. Following the document, install TinySVM.
2. Configure Yamacha as following:
./configure --prefix=/locations-you-like/
make

Error 1:
param.cpp: In member function 'bool YamCha::Param::open(int, char**, const YamCha::Option*)':
param.cpp:102:42: error: 'strlen' was not declared in this scope
param.cpp:103:68: error: 'strncmp' was not declared in this scope
param.cpp: In member function 'bool YamCha::Param::open(const char*, const YamCha::Option*)':
param.cpp:182:28: error: 'strncpy' was not declared in this scope
param.cpp:185:14: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
param.cpp: In member function 'void YamCha::Param::help(std::ostream&, const YamCha::Option*)':
param.cpp:205:42: error: 'strlen' was not declared in this scope
param.cpp:211:38: error: 'strlen' was not declared in this scope

#vi param.h
#change include -> include

make

Error 2:
mkdarts.cpp: In function ‘int main(int, char**)’:
mkdarts.cpp:83:14: error: ‘atoi’ is not a member of ‘std’
Solution:
add following to the mkdarts:
#include

make
make install


3 comments:

Unknown said...
This comment has been removed by the author.
Unknown said...

The header files in the blog have been recognised as HTML tags
1. #includecstring for strlen and strcpy, ...
2. #include stdlib for atoi is not a member of std

Satanu said...

i added #include to mkdarts.cpp but still error 2