|
发表于 2019-6-10 10:45:14
|
显示全部楼层
本帖最后由 cole_1996 于 2019-6-10 11:22 编辑
我也用的VS2019,报错了:
1>MSVCRTD.lib(exe_main.obj) : error LNK2019: unresolved external symbol _main referenced in function "int __cdecl invoke_main(void)" (?invoke_main@@YAHXZ)
无法解析_main:
unresolved external symbol _main
建的是Windows Desktop项目,在Source File下创建了文件,代码:
- int __stdcall WinMain (
- HINSTANCE hInstance,
- HINSTANCE hPrevInstance,
- LPSTR lpCmdLine,
- int nShowCmd
- ) {
- MessageBox(NULL, TEXT("hello world"), TEXT("hello"), MB_OK);
- return 0;
- }
复制代码 |
|