Closed mochiron-desu closed 1 year ago
While compiling it using the
g++ -fPIC -shared DataProccessing/cLibs/helper.cpp -o DataProccessing/cLibs/c_lib.so
I was getting error such as:
DataProccessing/cLibs/helper.cpp: In function 'std::string pixelToBit(const uint8_t*, size_t, size_t)': DataProccessing/cLibs/helper.cpp:14:48: error: 'round' was not declared in this scope 14 | bits += to_string(static_cast<int>(round(pix[i * width + j] / 255.0)) > 0.5 ? 1 : 0); | ^~~~~
I kind of fixed it by adding the header of
#include <cmath>
in the file DataProccessing\cLibs\helper.cpp
and it compiled.
While compiling it using the
I was getting error such as: