源代码如下,非常简单:
#include<iostream>
#include<fstream>
#include<gmp.h>
#include <gmpxx.h>
#include <string>
#include <stdio.h>
using namespace std;
int main()
{
mp_bitcnt_t prec = 512;
mpf_class x(1.2000001000000000002,prec);
cout << "x的值:" << x << endl;
}
报错信息:无法解析的外部符号
可这种操作明明是官方文档上的示例,为什么会出现这种问题呢?