void函数debug报错must return a value?

void cOSG::Render(void ptr)
{
cOSG* osg = (cOSG*)ptr;

osgViewer::Viewer* viewer = osg->getViewer();

// You have two options for the main viewer loop
//      viewer->run()   or
//      while(!viewer->done()) { viewer->frame(); }

//viewer->run();
while(!viewer->done())
{
    osg->PreFrameUpdate();
    viewer->frame();
    osg->PostFrameUpdate();
    //Sleep(10);         // Use this command if you need to allow other processes to have cpu time
}

// For some reason this has to be here to avoid issue:
// if you have multiple OSG windows up
// and you exit one then all stop rendering

// AfxMessageBox("Exit Rendering Thread");

_endthread();

}

debug提示:error C4716: 'cOSG::Render' : must return a value

检查c++h文件你头部是否有冲突定义。

很可能是你.h中声明的函数的返回值类型跟你cpp中实现的时候不一致。