定义 main 时 MSVS2010 中的 LNK1561 链接错误

发布于 2024-09-15 13:44:31 字数 405 浏览 0 评论 0原文

我一直在制作几个项目,使用 C++>Empty Projects 从 Microsoft Visual Studio 2010 的教程网站编译小型 SDL 代码教程;所有这些项目都编译得很好。在所有这些项目中,我都使用这个版本的 main 作为我的入口点:

int main (int argc, char* args[]) {
    //code...
    return 0;
}

我是 SDL 和 C++ 的新手,但据我了解,这是所有 SDL 应用程序的基本入口点。但是,我在新项目中不断收到 LNK1561 链接错误(意味着链接器找不到入口点)。我尝试在项目编辑器中创建新项目并重新定义所有 SDL 依赖项(抱歉,如果这是错误的术语),就像我对有效项目所做的那样,但我仍然收到链接错误。我需要更改一些项目属性吗?

I have been making several projects to compile small SDL code tutorials from a tutorial site in Microsoft Visual Studio 2010 using C++>Empty Projects; and all of these projects have compiled fine. In all of these projects I've used this version of main for my entry point:

int main (int argc, char* args[]) {
    //code...
    return 0;
}

I am new to SDL and C++, but from what I understand this your basic entry point for ALL SDL applications. However, I continuously receive a LNK1561 linking error (means the linker couldn't find an entry point) on my new projects. I've tried making new projects and redefining all my SDL dependencies (sorry if thats wrong terminology) in the project editor like I did with the project that worked, and I still get a linking error. Is there some project property I need to change?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

生寂 2024-09-22 13:44:31

好吧,没关系,我知道这将是我忽略的愚蠢的事情......我在项目属性的链接器选项中设置了错误的子系统。

Okay nevermind, I knew it would be something stupid I overlooked... I set the subsystem wrong in the Linker options of my project properties.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文