编译时出错:unresolved external symbol _main 编译时出错:unresolved external symbol _main 为什么? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 appwizrd时是不是选择了win32 application啊。在project->setting里把c/c++-> project options里的win32改成console. 源程序如下:#include "afxwin.h"class CMyApp : public CWinApp{public: virtual BOOL InitInstance();};class CMainFrame : public CFrameWnd{};CMyApp myApp;BOOL CMyApp::InitInstance(){m_pMainWnd= new CMainFrame;((CMainFrame*)m_pMainWnd)->Create(NULL,"The MFC Application");m_pMainWnd->ShowWindow(m_nCmdShow); return TRUE;}在project->setting里把c/c++-> project options里的win32改成console之后,错误更多:--------------------Configuration: g - Win32 Debug--------------------Compiling...g.cppLinking...nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadexnafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __beginthreadexlibcd.lib(crt0.obj) : error LNK2001: unresolved external symbol _mainDebug/g.exe : fatal error LNK1120: 3 unresolved externalsError executing link.exe.g.exe - 4 error(s), 0 warning(s) 请推荐几本深入详解vc++2005的书 文件访问权限设置? goodboyws帮我一下吧 我的TreeList的Headerctr也是自绘的 如何响应Column移动的消息啊 我很想问大家, 程序员的路在哪里? 那里有GDI+的开发包下载? 如何屏蔽掉CTRL+ALT+DEL或者怎么让这几个键按下时无效? 聚合vs包容?关于类的设计问题 怎么优化图片的拖动? CScrollView中如何忽略鼠标滚轮的滚动?谢谢 一个关于ListView的问题 up有分!我使用完成端口,在readfile的时候为什么会出错。具体问题请进。。。。 google的搜索原理知道吗?
在project->setting里把c/c++-> project options里的win32改成console.
#include "afxwin.h"
class CMyApp : public CWinApp
{
public:
virtual BOOL InitInstance();
};
class CMainFrame : public CFrameWnd
{};
CMyApp myApp;BOOL CMyApp::InitInstance()
{
m_pMainWnd= new CMainFrame;
((CMainFrame*)m_pMainWnd)->Create(NULL,"The MFC Application");
m_pMainWnd->ShowWindow(m_nCmdShow);
return TRUE;
}
在project->setting里把c/c++-> project options里的win32改成console之后,错误更多:
--------------------Configuration: g - Win32 Debug--------------------
Compiling...
g.cpp
Linking...
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadex
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __beginthreadex
libcd.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/g.exe : fatal error LNK1120: 3 unresolved externals
Error executing link.exe.g.exe - 4 error(s), 0 warning(s)