louridas / pagerank

A pagerank implementation in C++ able to handle very big graphs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

test compilation error

tigran-a opened this issue · comments

include is missing in pagerank_test.cpp (or elsewhere in .h)

I guess you refer to the following compilation error:

clang: warning: treating 'c-header' input as 'c++-header' when in C++ mode, this behavior is deprecated
clang: error: cannot specify -o when generating multiple output files

Fixed now.

Sorry, my message was not shown correctly (less and greater were eaten)

git clone https://github.com/louridas/pagerank.git
cd test
$ ./pagerank_test
bash: ./pagerank_test: cannot execute binary file: Exec format error
$ make
make: 'pagerank_test' is up to date.
rm pagerank_test
$ make
g++ -Wall -o pagerank_test -I../cpp pagerank_test.cpp ../cpp/table.cpp
pagerank_test.cpp: In function ‘int main(int, char**)’:
pagerank_test.cpp:98:20: error: ‘numeric_limits’ was not declared in this scope
     cout.precision(numeric_limits<double>::digits10);
                    ^
pagerank_test.cpp:98:35: error: expected primary-expression before ‘double’
     cout.precision(numeric_limits<double>::digits10);
                                   ^
Makefile:5: recipe for target 'pagerank_test' failed
make: *** [pagerank_test] Error 1

adding #include <limits> into pagerank_test.cpp removed the error.