小编the*_*rge的帖子

VS 2015未解决的外部符号错误

我的代码抛出了这个错误:

1>MSVCRTD.lib(exe_winmain.obj) : error LNK2019: unresolved external symbol WinMain referenced in function "int __cdecl invoke_main(void)" (?invoke_main@@YAHXZ)
1>C:\Users\thequantumforge\Desktop\scripts\Visual Studio 2013\Projects\newtonsmethod\x64\Debug\newtonsmethod.exe : fatal error LNK1120: 1 unresolved externals
Run Code Online (Sandbox Code Playgroud)

代码如下:

#include <iostream>
#include <iomanip>
#include <stdlib.h>
#include <cmath>
#include <cfloat>
#include <chrono>
using namespace std;
const long double h = LDBL_EPSILON;

long double equation(long double x) {
    return (pow(x, 3) - x + 1);
}

long double intercept(long double x) {
    // x_n+1 = xn - f(xn)/f'(xn)
    long double deriv = (equation(x + …
Run Code Online (Sandbox Code Playgroud)

c++ c++11 visual-studio-2015

2
推荐指数
1
解决办法
2243
查看次数

标签 统计

c++ ×1

c++11 ×1

visual-studio-2015 ×1