|
在新建的文件里加了下面一段代码(来自网上),但是Link的时候有一堆这样的错误:
error LNK2019: 无法解析的外部符号"__declspec(dllimport) public: int __thiscall
之后把ogremain.lib,ois.lib加到工程,ogremain.dll,ois.dll考到debug目录下,link没有了错误,但是运行时弹出一个错误对话框就终止了,是哪里出错了呢?
#include "ExampleApplication.h"
class TutorialApplication : public ExampleApplication
{
protected:
public:
TutorialApplication()
{
}
~TutorialApplication()
{
}
protected:
void createScene(void)
{
}
};
#if OGRE_PLATFORM == PLATFORM_WIN32 || 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 == 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;
} |
-
|