错误LNK2019:函数___tmainCRTStartup中引用的未解析的外部符号_WinMain @ 16

时间:2014-11-09 01:54:15

标签: visual-studio visual-studio-2013 linker-errors

我正在尝试根据以下说明构建一个应用程序Aseprite: http://rtonare.net/w/aseprite 这与官方文档非常相似: https://github.com/aseprite/aseprite/blob/master/INSTALL.md 除了使用VS 2013.显然这应该有用,据开发人员说。

除了我不断收到链接器错误: 错误5错误LNK2019:未解析的外部符号_WinMain @ 16在函数___tmainCRTStartup中引用C:\ Users \ Travis \ Documents \ Development \ aseprite \ build \ src \ gen \ MSVCRT.lib(crtexew.obj)gen 错误6错误LNK1120:1个未解析的外部C:\ Users \ Travis \ Documents \ Development \ aseprite \ build \ src \ gen \ RelWithDebInfo \ gen.exe 1 1 gen

我真的不知道发生了什么事。我看到的关于他的错误的大多数帖子建议将子系统设置为从/ SUBSYSTEM:WINDOWS到/ SUBSYSTEM:CONSOLE,但这不是控制台应用程序。

我确实稍微研究了一下代码,在主应用程序文件main.cpp中这显示为入口点:

// Aseprite entry point. (Called from she library.)
    int app_main(int argc, char* argv[])
    {
     ...
     ...
     ...
    }

由她的图书馆调用,我相信它是Allegro游戏引擎的一部分。

我真的不知道从哪里开始,之前从未遇到过这个问题,它可能与入口点有关,而其他解决方案似乎并不适用。

1 个答案:

答案 0 :(得分:1)

cmake存在错误,无法正确生成VS解决方案。您应该尝试使用NMake构建aseprite。

https://github.com/aseprite/aseprite/issues/541