链接错误1561视觉工作室社区2015

时间:2015-11-12 21:27:30

标签: c++ visual-studio-2015 sdl

我在visual studio community 2015中使用了内置的NuGet包,以便自动下载并正确安装SDL版本1.2.15.16 for c ++。 出于某种原因,当我尝试包含SDL.h文件时,出现以下错误:

“必须定义LNK 1561入口点....未声明packages元素” 这是我的代码:

#include<iostream>
#include <string>
#include "SDL.h"
using namespace std;

int main() {

    cout << "HELLOO" << endl;
    string s;
    cin >> s;
    return 0;
}

1 个答案:

答案 0 :(得分:1)

您的main函数应完全定义为:

int main(int argc, char *argv[]) // note function arguments

因为SDL库期望它采用这种格式。

相关问题