- 论坛徽章:
- 0
|
- g++ -o OGLES2IntroducingPVRShell OGLES2IntroducingPVRShell.o PVRShellAPI.o PVR Shell.o PVRShellOS.o -L~/workspace/Magicube/Irrlicht/Linux/libIrrlicht.a -L~/w orkspace/Magicube/MagicubeSDK/Linux/libmcSDK.a -lEGL -lX11 -lGL
复制代码 错误:OGLES2IntroducingPVRShell.o: In function `OGLESIntroducingPVRShell::InitView()':
OGLES2IntroducingPVRShell.cpp.text+0x1a7): undefined reference to `createPVRShellApp'
collect2: ld returned 1 exit status
libmcSDK.a文件里由我想要的createPVRShellApp函数。我确定他已经编译进去了:函数源码:- extern "C" MAGICUBE_API IMagicCubeApp* MXCALLCONV createPVRShellApp(int screenWidth,int screenHeight)
- {
- //////////////////////////////////////////////////////////////////////////
- irr::IIrrlichtStub* mStub = irr::createStub();
- // 自定义适用于PVRShell下的VideoContext
- irr::video::IVideoContext* context = new irr::video::CPVRShellVideoContext(screenWidth,screenHeight);
- video::IVideoDriver* driver = mStub->createVideoDriver(context);
- irr::ITimer* timer = mStub->createTimer();
- irr::font::IFontEngine* fontengine = mStub->createFontEngine();
- fontengine->addFont((L"c:\\windows\\fonts\\simsun.ttc"),(L"simsun"),(L"simsun"),false,false);
- fontengine->addFont((L"c:\\windows\\fonts\\simhei.ttf"),(L"simhei"),(L"simhei"),false,false);
- video::SMaterial mat;// 设置材质
- mat.BackfaceCulling = true;mat.Lighting =false;mat.Wireframe = true;
- mat.DiffuseColor = video::SColor(255,255,255,255); driver->setMaterial(mat);
- IDrawContext* mIrrDrawContext = new mx::context::CIrrDrawContext(context,driver,timer,fontengine);
- context->drop(); driver->drop(); timer->drop(); fontengine->drop();
- // 自定义创建了一个FileService,因为创建多种FileSystem的创建需要依赖于stub
- // 若只需要一个FileSystem,可以在外界用stub创建好后传入
- IMxSite* mMagicubeSite = new mx::site::CMxSite("MyMagicCubeSiteDemo");
- IMagicCubeApp* mMagicubeApp = createMagicCubeApp(mMagicubeSite,mIrrDrawContext);
- mMagicubeSite->release();
- mIrrDrawContext->release();
- mStub->drop();
- return mMagicubeApp;
- }
复制代码 问题出在那里? |
|