<legend id='dt4pV'><style id='dt4pV'><dir id='dt4pV'><q id='dt4pV'></q></dir></style></legend>

      <small id='dt4pV'></small><noframes id='dt4pV'>

    1. <i id='dt4pV'><tr id='dt4pV'><dt id='dt4pV'><q id='dt4pV'><span id='dt4pV'><b id='dt4pV'><form id='dt4pV'><ins id='dt4pV'></ins><ul id='dt4pV'></ul><sub id='dt4pV'></sub></form><legend id='dt4pV'></legend><bdo id='dt4pV'><pre id='dt4pV'><center id='dt4pV'></center></pre></bdo></b><th id='dt4pV'></th></span></q></dt></tr></i><div id='dt4pV'><tfoot id='dt4pV'></tfoot><dl id='dt4pV'><fieldset id='dt4pV'></fieldset></dl></div>

        <tfoot id='dt4pV'></tfoot>
        • <bdo id='dt4pV'></bdo><ul id='dt4pV'></ul>

      1. 错误 LNK2019:函数 ___tmainCRTStartup 中引用了未解析的

        时间:2023-09-18
        <legend id='n0uKI'><style id='n0uKI'><dir id='n0uKI'><q id='n0uKI'></q></dir></style></legend>
            <bdo id='n0uKI'></bdo><ul id='n0uKI'></ul>

                  <tbody id='n0uKI'></tbody>
                • <i id='n0uKI'><tr id='n0uKI'><dt id='n0uKI'><q id='n0uKI'><span id='n0uKI'><b id='n0uKI'><form id='n0uKI'><ins id='n0uKI'></ins><ul id='n0uKI'></ul><sub id='n0uKI'></sub></form><legend id='n0uKI'></legend><bdo id='n0uKI'><pre id='n0uKI'><center id='n0uKI'></center></pre></bdo></b><th id='n0uKI'></th></span></q></dt></tr></i><div id='n0uKI'><tfoot id='n0uKI'></tfoot><dl id='n0uKI'><fieldset id='n0uKI'></fieldset></dl></div>

                • <small id='n0uKI'></small><noframes id='n0uKI'>

                  <tfoot id='n0uKI'></tfoot>
                • 本文介绍了错误 LNK2019:函数 ___tmainCRTStartup 中引用了未解析的外部符号 _main,但这一次不是 Windows/控制台问题!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  所以,臭名昭著的错误又回来了.该项目抱怨它找不到 main() 方法(这就是错误的含义,对).

                  So, the infamous error is back. The project is complaining that it can't find the main() method (that's what the error means, right).

                  但是我确实有一个主项目,而且我的项目应该是一个控制台项目.它以前有效,所以我知道不是那样.

                  However I do have a main, and my project is a Console project, as it should be. It worked before, so I know it's not that.

                  此外,该项目的类和文件太多,我无法将它们全部发布,因此我会根据您的要求发布任何您需要的类.

                  Also, the project has too many classes and files for me to post them all, so I will post any classes you need by request.

                  这是 Visual Studio 2010 上的 C++、OpenGL 和 SDL 游戏.这不是任何库的问题,因为它在突然莫名其妙地显示此链接器错误之前运行良好.

                  It's a C++, OpenGL and SDL game on Visual Studio 2010. It's not a problem of any of the libraries, as it was working fine before it suddenly and inexplicably showed this linker error.

                  main() 方法:

                  int main(int argc, char **argv)
                  {
                   glutInit(&argc, argv);
                   glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH | GLUT_ALPHA);
                   glutCreateWindow("Game");
                  
                   glEnable(GL_DEPTH_TEST);
                   glEnable(GL_NORMALIZE);
                   glEnable(GL_COLOR_MATERIAL);
                   glEnable(GL_BLEND);
                   glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
                  
                   g = Game();
                   glutInitWindowSize(g.getScreenWidth(), g.getScreenHeight());
                   //glutPositionWindow(1280, 50);
                  
                   // Callbacks
                   glutDisplayFunc(handleRedraw);
                   glutReshapeFunc(handleResize);
                   glutMouseFunc(handleMouseClicks);
                   glutPassiveMotionFunc(handleMouseOvers);
                   glutKeyboardFunc(handleKeyboardEvents);
                   glutTimerFunc(50, moveItemToInventory, 0);
                  
                   glutMainLoop();
                  
                   return 0;
                  }
                  

                  推荐答案

                  SDL_main.h 自动包含在 SDL.h 中,因此您总是会遇到讨厌的 #define.

                  SDL_main.h is included automatically from SDL.h, so you always get the nasty #define.

                  随便写:

                  #include <SDL.h>
                  #undef main
                  

                  它应该可以正常工作

                  这篇关于错误 LNK2019:函数 ___tmainCRTStartup 中引用了未解析的外部符号 _main,但这一次不是 Windows/控制台问题!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:什么时候绑定到 VAO? 下一篇:Opengl:3D 上的 2d HUD

                  相关文章

                  最新文章

                  <i id='gd8VM'><tr id='gd8VM'><dt id='gd8VM'><q id='gd8VM'><span id='gd8VM'><b id='gd8VM'><form id='gd8VM'><ins id='gd8VM'></ins><ul id='gd8VM'></ul><sub id='gd8VM'></sub></form><legend id='gd8VM'></legend><bdo id='gd8VM'><pre id='gd8VM'><center id='gd8VM'></center></pre></bdo></b><th id='gd8VM'></th></span></q></dt></tr></i><div id='gd8VM'><tfoot id='gd8VM'></tfoot><dl id='gd8VM'><fieldset id='gd8VM'></fieldset></dl></div>

                • <legend id='gd8VM'><style id='gd8VM'><dir id='gd8VM'><q id='gd8VM'></q></dir></style></legend>
                  <tfoot id='gd8VM'></tfoot>
                  1. <small id='gd8VM'></small><noframes id='gd8VM'>

                      • <bdo id='gd8VM'></bdo><ul id='gd8VM'></ul>