连 hello world 不能编译通过
我是一字不误的把书上的代码写上去的,可一按F5就出错了!请各位指点!
代码如下:
// jjkk.cpp : Defines the entry point for the application.
//
#include "stdafx.h"
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
// TODO: Place code here.
MessageBox(NULL,"hello world","msgbox",0);
return 0;
}
错误信息:
--------------------Configuration: jjkk - Win32 Debug--------------------
Compiling...
Error spawning cl.exe
jjkk.exe - 1 error(s), 0 warning(s)
后来把 APIENTRY 改成 WINAPI 也是同样的错误!