Quadruple precision in G++ 4.6.3 Linux using quadmath
问题 I try to execute the code #include <quadmath.h> #include <iostream> int main() { char* y = new char[1000]; quadmath_snprintf(y, 1000, "%Qf", 1.0q); std::cout << y << std::endl; return 0; } with commands g++ test.cpp -o test I get the error: /tmp/cctqto7E.o: In function `main': test.cpp:(.text+0x51): undefined reference to `quadmath_snprintf(char*, unsigned int, char const*, ...)' collect2: ld returned 1 exit status The version is: g++ --version g++ (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3