g++ -std=c++11 -o flint flint.cpp -lflint
#include <flint/fmpq_poly.h>
#include <benchpress/benchpress.hpp>
#include "series-benchmark.h"
int main()
{
fmpq_poly_t x, y, z;
fmpq_poly_init (x);
fmpq_poly_init (y);
fmpq_poly_init (z);
fmpq_poly_set_coeff_ui(x, 1, 1);
fmpq_poly_sin_series(x, x, N);
fmpq_poly_set_coeff_ui(y, 1, 1);
fmpq_poly_cos_series(y, y, N);
BENCHMARK("flint", [&](benchpress::context* ctx) {
for (size_t i = 0; i < ctx->num_iterations(); ++i) {
fmpq_poly_mullow (z , x , y, N) ;
}
})
fmpq_poly_clear (x);
fmpq_poly_clear (y);
fmpq_poly_clear (z);
return 0;
}
/tmp/ccSDe92z.o: In function `benchpress::registration::get_ptr()':
flint.cpp:(.text._ZN10benchpress12registration7get_ptrEv[_ZN10benchpress12registration7get_ptrEv]+0xa): undefined reference to `benchpress::registration::d_this'
flint.cpp:(.text._ZN10benchpress12registration7get_ptrEv[_ZN10benchpress12registration7get_ptrEv]+0x42): undefined reference to `benchpress::registration::d_this'
flint.cpp:(.text._ZN10benchpress12registration7get_ptrEv[_ZN10benchpress12registration7get_ptrEv]+0x49): undefined reference to `benchpress::registration::d_this'
collect2: error: ld returned 1 exit status
This:
with
flint.cpp:produces
Please Help!