|
使用的是VC8的sdk,附加include和lib的路径都已经按照教程添加到了VS2005的设置中。
自己新建了一个解决方案,加入一个项目,使用的代码是教程上的,如下:
(我也把sdk中的debug和release拷到了工程目录下)
#include "ExampleApplication.h"
class TutorialApplication : public ExampleApplication
{
protected:
public:
TutorialApplication()
{
}
~TutorialApplication()
{
}
protected:
void createScene(void)
{
}
};
#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
#define WIN32_LEAN_AND_MEAN
#include "windows.h"
INT WINAPI WinMain( HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT )
#else
int main(int argc, char **argv)
#endif
{
// Create application object
TutorialApplication app;
try {
app.go();
} catch( Exception& e ) {
#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
MessageBox( NULL, e.getFullDescription().c_str(), "An exception has occured!", MB_OK | MB_ICONERROR | MB_TASKMODAL);
#else
fprintf(stderr, "An exception has occured: %s\n",
e.getFullDescription().c_str());
#endif
}
return 0;
}
/////////////////////////////////////////////////////////////////////////////////////////////////////
编译通过,链接时出现无法解析的外部符号:
1>正在链接...
1>1026_OgreSDK165FirstSample.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: void __thiscall Ogre::Root::startRendering(void)" (__imp_?startRendering@Root@Ogre@@QAEXXZ),该符号在函数 "public: virtual void __thiscall ExampleApplication::go(void)" (?go@ExampleApplication@@UAEXXZ) 中被引用
1>1026_OgreSDK165FirstSample.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: static void __cdecl Ogre::AllocatedObject<class Ogre::CategorisedAllocPolicy<0> >: perator delete(void *,char const *,int,char const *)" (__imp_??3?$AllocatedObject@V?$CategorisedAllocPolicy@$0A@@Ogre@@@Ogre@@SAXPAXPBDH1@Z),该符号在函数 __unwindfunclet$?setup@ExampleApplication@@MAE_NXZ$0 中被引用
。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
1>D:\My Documents\Visual Studio 2005\Projects\GameStudyAugust\Debug\1026_OgreSDK165FirstSample.exe : fatal error LNK1120: 66 个无法解析的外部命令
1>生成日志保存在“file://d:\My Documents\Visual Studio 2005\Projects\GameStudyAugust\1026_OgreSDK165FirstSample\Debug\BuildLog.htm”
1>1026_OgreSDK165FirstSample - 67 个错误,0 个警告
翻了论坛里面的帖子貌似没有人帮忙解决,实在是没办法了 |
|