是按照下面這篇博客配置的GMP:
https://blog.csdn.net/a675115471/article/details/104425406?ops_request_misc=&request_id=&biz_id=102&utm_term=vs2017%E9%85%8D%E7%BD%AEgmp&utm_medium=distribute.pc_search_result.none-task-blog-2~all~sobaiduweb~default-1-104425406
已经安装了gcc和msys,也已经配置了VS,就是添加附加库目录和附加依赖项,安装的GMP版本是6.2.0,测试代码如下:
#include <iostream>
#include "gmpxx.h"
using namespace std;
int main()
{
mpz_class a, b, c;
a = 1234;
b = "5678";
c = a + b;
cout << "sum is " << c << "\n";
cout << "absolute value is " << abs(c) << "\n";
return 0;
}
出现的问题是:
在头文件里面也已经添加了gmp.h和gmpxx.h:
为什么会找不到gmp.h这个文件呢?