如果mingw-w64不支持wwinmain,那么什么c++我应该使用编译器吗?

发布于 2025-01-28 15:10:24 字数 686 浏览 1 评论 0 原文

我一直在尝试遵循本指南在C ++中编写一个程序,该程序允许我创建一个应用程序窗口,但是我遇到了一个问题,每当我在上面链接的页面上提供的示例代码上使用MINGW-W64运行构建任务时,我会继续运行陷入相同的错误。

c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../libmingw32.a(main.o):(.text.startup+0xc0): undefined reference to 'WinMain@16'

collect2.exe: error: ld returned 1 exit status

该位的重要部分是未定义的引用“ Winmain@16'”。显然,由于我尝试过的示例代码使用了wwinmain而不是winmain,所以mingw找不到任何入口点?因此,这意味着如果我想运行此代码,我不能使用mingw。那我该怎么办?哪种编译器实际上可以用于编译WWINMAIN?

I've been attempting to follow this guide here for writing a program in C++ that allows me to create an application window, however I ran into an issue where whenever I used Run Build Task with MinGW-w64 on the example code provided on the page linked above, I keep running into this same error.

c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../libmingw32.a(main.o):(.text.startup+0xc0): undefined reference to 'WinMain@16'

collect2.exe: error: ld returned 1 exit status

The important part of that bit is the undefined reference to 'WinMain@16' at the end. Apparently because the sample code I tried uses wWinMain instead of WinMain, MinGW can't find any entry point? So this would mean I can't use MinGW if I want to run this code. So what do I do instead? What compiler would actually work for compiling wWinMain?

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文