I got some errors using the suggested build command:
$ g++ -std=c++11 ../src/**/*.cpp -o mx
../src/compute/mx_sum.cpp:158:46: error: ‘log’ is not a member of ‘std’; did you mean ‘clog’?
158 | data[pidx][0] = std::log(data[pidx][0]);
../src/compute/mx_sum.cpp:158:46: error: ‘log’ is not a member of ‘std’; did you mean ‘clog’?
158 | data[pidx][0] = std::log(data[pidx][0]);
| ^~~
| clog
../src/extract/mx_extract.cpp: In function ‘void mx_extract_file(MX_opt&)’:
../src/extract/mx_extract.cpp:205:21: error: ‘pow’ is not a member of ‘std’
205 | size_t N = std::pow(2, 10); // 1024
| ^~~
../src/extract/mx_extract.cpp: In function ‘void mx_extract_index(MX_opt&)’:
../src/extract/mx_extract.cpp:311:21: error: ‘pow’ is not a member of ‘std’
311 | size_t N = std::pow(2, 10); // 1024
These were fixed by adding #include <cmath> to Common.hpp
And then I got a couple of linker errors involving functions defined in Common.cpp. To fix these I added ../src/*.cpp to the build command:
g++ -std=c++11 ../src/*.cpp ../src/**/*.cpp -o mx
For compiling Common.cpp, I also needed to add #include <cmath> in that file.
Hi! Thank you for your issue. I have updated the README.md to include installation instructions. We originally started to write mx in cpp but decided to continue development in python.
I got some errors using the suggested build command:
These were fixed by adding
#include <cmath>
to Common.hppAnd then I got a couple of linker errors involving functions defined in Common.cpp. To fix these I added
../src/*.cpp
to the build command:g++ -std=c++11 ../src/*.cpp ../src/**/*.cpp -o mx
For compiling Common.cpp, I also needed to add
#include <cmath>
in that file.