win32 application怎么改成win32 console application?
我需要向win32程序(网上找的)中添加数据进行修改,但是自己不会写,看到网上说可以转变为控制台程序,自己没改成功提示错误Linking...LIBCD.lib(crt0...
我需要向win32程序(网上找的)中添加数据进行修改,但是自己不会写,看到网上说可以转变为控制台程序,自己没改成功
提示错误
Linking...
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/BallCollison.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
请问到底应该怎么设置?如果只能通过重建工程,修改代码解决,应该怎么改代码?
或者告诉我一个简单的win32程序输入数据的方法.谢谢了
入口函数如下
int WINAPI WinMain( HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
MSG msg;
BOOL done=FALSE;
if (MessageBox(NULL,"Would You Like To Run In Fullscreen Mode?", "Start FullScreen?",MB_YESNO|MB_ICONQUESTION)==IDNO)
{fullscreen=FALSE; }
InitVars();
if (!CreateGLWindow("Magic Room",640,480,16,fullscreen))
{return 0; }
while(!done)
{if (PeekMessage(&msg,NULL,0,0,PM_REMOVE))
{if (msg.message==WM_QUIT
{done=TRUE;}
else {TranslateMessage(&msg);
DispatchMessage(&msg);}
}
else
if (active)
{DrawGLScene()
if (keys[VK_ESCAPE])
{done=TRUE; }
else
{
idle();
DrawGLScene();
SwapBuffers(hDC);
}
if (!ProcessKeys()) return 0;
}
}
KillGLWindow();
glDeleteTextures(4,texture);
return (msg.wParam);
} 展开
提示错误
Linking...
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/BallCollison.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
请问到底应该怎么设置?如果只能通过重建工程,修改代码解决,应该怎么改代码?
或者告诉我一个简单的win32程序输入数据的方法.谢谢了
入口函数如下
int WINAPI WinMain( HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
MSG msg;
BOOL done=FALSE;
if (MessageBox(NULL,"Would You Like To Run In Fullscreen Mode?", "Start FullScreen?",MB_YESNO|MB_ICONQUESTION)==IDNO)
{fullscreen=FALSE; }
InitVars();
if (!CreateGLWindow("Magic Room",640,480,16,fullscreen))
{return 0; }
while(!done)
{if (PeekMessage(&msg,NULL,0,0,PM_REMOVE))
{if (msg.message==WM_QUIT
{done=TRUE;}
else {TranslateMessage(&msg);
DispatchMessage(&msg);}
}
else
if (active)
{DrawGLScene()
if (keys[VK_ESCAPE])
{done=TRUE; }
else
{
idle();
DrawGLScene();
SwapBuffers(hDC);
}
if (!ProcessKeys()) return 0;
}
}
KillGLWindow();
glDeleteTextures(4,texture);
return (msg.wParam);
} 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询