我编写了这个小程序,仅用于测试目的:
#include <iostream>
using namespace std;
int formn (int x)
{
int k;
k = 2*x^2-4;
return k;
}
/*
*
*/
int main() {
int x1, x0, y1, y0, a, b, res;
std::cin >> x0;
std::cin >> x1;
y0 = formn(x0);
y1 = formn(x1);
a = y1 - y0;
b = x1 - x0;
res = a/b;
cout << endl << "P0(" << x0 << "|" << y0 << ") and P1(" << x1 << "|" << y1 << ") " << res << ".\n";
return 0;
}
但是一旦我尝试编译它,它就会给我一个链接器错误:
[链接器错误]未定义引用&#39; __ dyn_tls_init_callback&#39; [链接器错误]未定义引用&#39; __ cpu_features_init&#39; [链接器错误]未定义引用&#39; _setargv&#39; Id返回1退出状态 C:\ Dev-Cpp \ Makefile.win [构建错误] [proj001.exe]错误1
有人能帮帮我吗?
我无法找到解决此问题的方法......