2013-12-22 99 views
0
#include <windows.h> 

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine,nShowCmd) 
{ 
    MessageBox(NULL, L"Hello World!", L"Just another Hello World program!", MB_ICONEXCLAMATION | MB_OK); 
    return 0; 
} 

通过教程学习C++入门知识,无法获得第一个hello world示例进行编译。LNK2019:无法解析的外部符号_main在函数中引用__tmainCRTStartup

使用visual studio express 2012.我所做的全部工作就是创建一个新项目并将其复制到其中,以取代tmain函数。

请问有谁知道如何解决这个问题?

+0

[尝试此线程](http://stackoverflow.com/questions/4845410/error-lnk2019-unresolved-external-symbol-main-referenced-in-function-tmainc?rq=1) – ben4808

回答

相关问题