链接器错误未定义对"WinMain @ 16"的引用 [英] Linker error undefined reference to `WinMain@16'

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

问题描述

我有以下链接器错误,我怀疑这与正在使用的链接器有关,但我似乎不知道此问题的出处.

I have the following linker error and I suspect this has to do with linker that is being used but I don't seem to know where this problem is from.

[Linker error] undefined reference to `WinMain@16'

请在Windows Vista Professional计算机上使用Dev C ++工作

I am working in Dev C++ please on windows Vista Professional machine

#include <cstdlib>
#include <iostream>

using namespace std;

int main(int argc, char *argv[])
{
    char * pointarrty = "234";
    int a = 0;

    system("PAUSE");
    return EXIT_SUCCESS;
}

推荐答案

来自 MSDN:

如果使用的是Unicode和MFC,则如果不创建wWinMainCRTStartup的入口点,则将在_WinMain @ 16上得到一个未解决的外部文件.使用/ENTRY.请参阅Unicode编程摘要.

If you are using Unicode and MFC, you will get an unresolved external on _WinMain@16 if you don't create an entrypoint to wWinMainCRTStartup; use the /ENTRY. See Unicode Programming Summary.

要设置入口点,请参见 MSDN 文章

To set the entry point, refer, the MSDN article

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

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