注册 登录
编程论坛 VC++/MFC

编译过程中经常提示出错

羽盛科技 发布于 2013-06-22 14:33, 1182 次点击
各位前辈,我是初学者,在编译过程中经常出现以下错误,我知道出错的意思,就是不知道如何去修改,请各位指点迷津,万分感谢!!!
--------------------Configuration: Hello World - Win32 Debug--------------------
Compiling...
MainFrm.cpp
C:\Program Files\Microsoft Visual Studio\MyProjects\Hello World\MainFrm.cpp(49) : error C2509: 'OnCreate' : member function not declared in 'CMainFrame'
        c:\program files\microsoft visual studio\myprojects\hello world\mainfrm.h(13) : see declaration of 'CMainFrame'
C:\Program Files\Microsoft Visual Studio\MyProjects\Hello World\MainFrm.cpp(79) : error C2509: 'PreCreateWindow' : member function not declared in 'CMainFrame'
        c:\program files\microsoft visual studio\myprojects\hello world\mainfrm.h(13) : see declaration of 'CMainFrame'
Error executing cl.exe.

Hello World.exe - 2 error(s), 0 warning(s)
6 回复
#2
yuccn2013-06-22 19:43
error C2509: 'OnCreate' : member function not declared in 'CMainFrame'

是否'OnCreate'  这个函数没有定义?
#3
一明2013-06-23 08:32
求源代码?
#4
羽盛科技2013-06-24 16:09
具体应怎么操作啊?

#5
羽盛科技2013-06-24 23:04
我找到原因了
#6
一明2013-07-15 21:49
我要源代码,有点麻烦吧?不过看到你解决了问题还是很高兴。
#7
一明2013-07-15 21:52
以后记住,源文件与头文件的连接,以及函数申明的作用位置与范围。
1