gpt4 book ai didi

ogre - 未解析的外部符号 _WinMain@16

转载 作者:行者123 更新时间:2023-12-04 18:22:03 26 4
gpt4 key购买 nike

我尝试编译以下代码(来自 Felix Kerger 的 Ogre3d 初学者指南)

#include "Ogre\ExampleApplication.h"    

class Example1 : public ExampleApplication
{
public:
void createScene()
{Ogre::Entity* ent =
mSceneMgr->createEntity("MyEntity","Sinbad.mesh");
mSceneMgr->getRootSceneNode()->attachObject(ent);
}
};



int main (void)
{
Example1 app;
app.go();
return 0;
}

所以编译的过程不起作用。我目前正在使用 Visual Studio 2010 和 OgreSDK_vc10_v1-7-3。

错误是
1>InitializeBuildStatus:
1> Touching "obj\Debug\OgreApp3.unsuccessfulbuild".
1>ClCompile:
1> main.cpp
1>d:\ogresdk_vc10_v1-7-3\include\ogre\exampleframelistener.h(343): warning C4244: '+=': conversion from 'double' to 'Ogre::Real', possible loss of data
1>d:\ogresdk_vc10_v1-7-3\include\ogre\exampleframelistener.h(344): warning C4244: '-=' : conversion from 'double' to 'Ogre::Real', possible loss of data
1>d:\ogresdk_vc10_v1-7-3\include\ogre\exampleframelistener.h(348): warning C4244: 'argument' : conversion from 'double' to 'Ogre::Real', possible loss of data
1>d:\ogresdk_vc10_v1-7-3\include\ogre\exampleframelistener.h(349): warning C4244: 'argument' : conversion from 'double' to 'Ogre::Real', possible loss of data
1>d:\ogresdk_vc10_v1-7-3\include\ogre\exampleframelistener.h(454): warning C4244: '-=' : conversion from 'double' to 'Ogre::Real', possible loss of data
1>ManifestResourceCompile:
1> All outputs are up-to-date.
1>MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
1>bin\Debug\\OgreApp3.exe : fatal error LNK1120: 1 unresolved externals
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:10.57
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

最佳答案

将 main 函数的签名替换为以下内容:

INT WINAPI WinMain( HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT )

关于ogre - 未解析的外部符号 _WinMain@16,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10464164/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com