Screaming Loud

研究・プログラミングなど気づいたことをメモをしています。読書記録はこちらに記載しています。https://bookmeter.com/users/75944

GibbsLDA++-0.2のmakeのエラーについて

GibbsLDA++を使おうと思ってmakeしたら以下のようなメッセージが

utils.cpp: In static member function ‘static int utils::parse_args(int, char**, model*)’:
utils.cpp:69: error: ‘atof’ was not declared in this scope
utils.cpp:72: error: ‘atof’ was not declared in this scope
utils.cpp:75: error: ‘atoi’ was not declared in this scopeutils.cpp:78: error: ‘atoi’ was not declared in this scope
utils.cpp:81: error: ‘atoi’ was not declared in this scope
utils.cpp:84: error: ‘atoi’ was not declared in this scope
utils.cpp: In static member function ‘static int utils::read_and_parse(std::string, model*)’:
utils.cpp:270: error: ‘atof’ was not declared in this scope
utils.cpp:273: error: ‘atof’ was not declared in this scope
utils.cpp:276: error: ‘atoi’ was not declared in this scope
utils.cpp:279: error: ‘atoi’ was not declared in this scope
utils.cpp:282: error: ‘atoi’ was not declared in this scope
utils.cpp:285: error: ‘atoi’ was not declared in this scope

解決方法としては
src/utill.cppに

#include<stdio.h>
#include<stdlib.h>

src/utill.hに

#include<stdlib.h>

src/lda.cppに

#include<stdio.h>

以上を書き加えるとコンパイルが通りました.

広告を非表示にする