未定义对"WinMain @ 16"的引用? [英] undefined reference to `WinMain@16'?

查看:87
本文介绍了未定义对"WinMain @ 16"的引用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我查看了其他解决方案,但是我不知道为什么这样说,因为我有一个主电源.我曾尝试将其构建为控制台应用程序和GUI应用程序.假设它是一个GUI应用程序(SDL).头文件中的任何地方都必须有一个主文件吗?你会因为什么原因有一个 main 和 main 没有找到.

I looked at other solutions but I don't know why it says this because I have a main. I have tried building as a console app and GUI app. It's suppose to be a GUI app(SDL). Does there have to be a main anywhere in the header files? For what reason would you have a main and main is not found.

35小时后,我终于认为这是最后一个错误.

After 35 hours I finally think that this is the last error.

我的IDE是代码块,我的编译器是MinGW32.

My IDE is Code Blocks, my compiler is MinGW32.

推荐答案

我将mingw32放在链接器的顶部,然后可以使用常规main.在包含windows.h并获得所有额外的参数后,我已经在winmain上工作了.但是我为了简单起见删除了它.

I put mingw32 at the top of the linker and then I could use regular main. I had winmain working after I included windows.h and got all the extra args. But I deleted it for something simpler.

这篇关于未定义对"WinMain @ 16"的引用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆