HanBae / HeVote

HeVote: Electronic Voting System ÐApp using HElib-Based on Ethereum & IPFS.
Apache License 2.0
0 stars 1 forks source link

최신 Helib를 사용할 때 빌드시 오류 #2

Open tkddn204 opened 5 years ago

tkddn204 commented 5 years ago
~/HeVote/app/hec$ make all
HElib requires NTL version 10.0.0 or higher, see http://shoup.net/ntl
If you get compilation errors, try to add/remove -std=c++11 in Makefile
g++ -g -O2 -std=c++11 -pthread -DFHE_THREADS -DFHE_BOOT_THREADS -fmax-errors=2 -IHElib/src -o bin/createKeys src/createKeys.cpp HElib/src/fhe.a -L/usr/local/lib -lntl -lgmp -lm
src/createKeys.cpp: In function ‘int main(int, char**)’:
src/createKeys.cpp:35:5: error: ‘string’ was not declared in this scope
     string owner = "owner";
     ^~~~~~
src/createKeys.cpp:35:5: note: suggested alternatives:
In file included from /usr/include/c++/7/iosfwd:39:0,
                 from /usr/include/c++/7/ios:38,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/fstream:38,
                 from src/createKeys.cpp:2:
/usr/include/c++/7/bits/stringfwd.h:74:33: note:   ‘std::__cxx11::string’
   typedef basic_string<char>    string;
                                 ^~~~~~
/usr/include/c++/7/bits/stringfwd.h:74:33: note:   ‘std::__cxx11::string’
/usr/include/c++/7/bits/stringfwd.h:74:33: note:   ‘std::__cxx11::string’
src/createKeys.cpp:36:12: error: expected ‘;’ before ‘dir’
     string dir = "data";
            ^~~
compilation terminated due to -fmax-errors=2.
Makefile:54: recipe for target 'bin/createKeys' failed
make: *** [bin/createKeys] Error 1
~/HeVote/app/hec$
tkddn204 commented 5 years ago

해결 방안으로 Armadillo 라이브러리 사용하는 방안 제시

sudo apt install cmake libopenblas-dev liblapack-dev 
wget http://sourceforge.net/projects/arma/files/armadillo-9.200.7.tar.xz
tar -xvf armadillo-9.200.7.tar.xz
cd armadillo-9.200.7/
cmake .
make
sudo make install