SDL_main将问题与VS2010链接
SDL_main linking issue with VS2010
我已经为OpenGL应用程序编写了一些基本的设置代码:
#include <Windows.h>
#include <gl/gl.h>
#include <SDL.h>
int main()
{
SDL_Init( SDL_INIT_VIDEO );
SDL_Surface* surface = SDL_SetVideoMode( 800, 600, 32, SDL_HWSURFACE | SDL_DOUBLEBUF | SDL_OPENGL );
glViewport( 0, 0, 800, 600 );
SDL_Event windowEvent;
while ( true )
{
if ( SDL_PollEvent( &windowEvent ) )
{
if ( windowEvent.type == SDL_QUIT ) break;
}
glClearColor( 1.0f, 0.0f, 0.0f, 1.0f );
glClear( GL_COLOR_BUFFER_BIT );
SDL_GL_SwapBuffers();
}
SDL_Quit();
return 0;
}
不幸的是,这未能与以下错误链接:
1>SDLmain.lib(SDL_win32_main.obj) : error LNK2001: unresolved external symbol _SDL_main
链接器设置:
http://puu.sh/kVae
使用main
的完整签名:
int main(int argc, char *argv[])
或
int main(int argc, char **argv)
或者尝试实现CCD_ 2而不是CCD_。
相关文章:
- 提升 ASIO 1.66 示例无法构建 - async_connect() 需要单个迭代器无法在 VS2010 上链接
- VS2010无法链接它应该构建的库
- 将VS2010与Assimp链接
- 为旧版本调整VS2010和VS6编译器和链接器开关
- C++VS2010链接器关于命名空间变量的错误
- get_driver_instance()MySQL C++VS2010的链接器错误
- vs2010 上的 Zlib 链接器错误
- 使用 cmake 和 vs2010 链接到静态提升库,而无需自动链接
- 在VS2010控制台应用程序中链接Windows.h (WNDCLASSEX)代码
- VS2010 在流上链接问题
- 在VS2010中使用Boost.Pool - 链接器错误
- 使用Qt插件将功能移动到VS2010中的其他文件时出现链接器错误
- QT 创建器 qt5.1 vs2010 使用静态库时出现链接器错误
- SDL_main将问题与VS2010链接
- VS2010将项目输出库与依赖库链接(无项目)
- VS2010链接器设置
- VS2010-添加静态库时发生链接器错误
- 链接器问题将C++项目从vs2005移动到vs2010
- VS2010查找调试符号时,静态库链接
- VS2010链接警告