|
// [1/7/2009 Unreal]
#include <osg/ref_ptr>
#include <osg/Group>
#include <osgViewer/Viewer>
#include <iostream>
//-----------------------------------------------------------------------------------------
#include <osg/Node>
#include <osg/PositionAttitudeTransform>
#include <osgText/Text>
#include <osgText/Font>
//-----------------------------------------------------------------------------------------
//-----------------------------------------------------------------------------------------
using namespace osg;
int main(int argc, char** argv)
{
Group* root = NULL;
//需要 #include <osg/Node>
Node* tankNode = NULL;
//需要 #include <osg/PositionAttitudeTransform>
PositionAttitudeTransform* tankXform;
//HUD几何体叶子节点
Geode* HUDGeode = new Geode();
//用于作HUD显示的Text实例
//需要 #include <osgText/Text>
osgText::Text* textOne = new osgText::Text();
//这个文字实例将跟随坦克显示
//osgText::Text* tankLabel = new osgText::Text();
//投影节点用于定义HUD的视景体(view frustrum)
//Projection* HUDProjectionMatrix = new Projection();
//osg::ref_ptr<osg::Group> root = new osg::Group;
//osgViewer::Viewer viewer;
//viewer.setSceneData( root.get() );
//return viewer.run();
}
用了上面的代码,但是却编译不同,提示了如下的问题.应该是osgText::Text时出现的问题,请大家帮帮忙~
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall osgText::Text::Text(void)" (__imp_??0Text@osgText@@QAE@XZ) referenced in function _main
1>main.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall osgText::Text::setThreadSafeRefUnref(bool)" (?setThreadSafeRefUnref@Text@osgText@@UAEX_N@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual class osg::Object * __thiscall osgText::Text::cloneType(void)const " (?cloneType@Text@osgText@@UBEPAVObject@osg@@XZ)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual class osg::Object * __thiscall osgText::Text::clone(class osg::CopyOp const &)const " (?clone@Text@osgText@@UBEPAVObject@osg@@ABVCopyOp@4@@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall osgText::Text::isSameKindAs(class osg::Object const *)const " (?isSameKindAs@Text@osgText@@UBE_NPBVObject@osg@@@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual char const * __thiscall osgText::Text::libraryName(void)const " (?libraryName@Text@osgText@@UBEPBDXZ)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual char const * __thiscall osgText::Text::className(void)const " (?className@Text@osgText@@UBEPBDXZ)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall osgText::Text::resizeGLObjectBuffers(unsigned int)" (?resizeGLObjectBuffers@Text@osgText@@UAEXI@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall osgText::Text::releaseGLObjects(class osg::State *)const " (?releaseGLObjects@Text@osgText@@UBEXPAVState@osg@@@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual class osg::BoundingBox __thiscall osgText::TextBase::computeBound(void)const " (?computeBound@TextBase@osgText@@UBE?AVBoundingBox@osg@@XZ)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall osgText::Text::drawImplementation(class osg::RenderInfo &)const " (?drawImplementation@Text@osgText@@UBEXAAVRenderInfo@osg@@@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall osgText::Text::supports(class osg:rimitiveFunctor const &)const " (?supports@Text@osgText@@UBE_NABVPrimitiveFunctor@osg@@@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall osgText::Text::supports(class osg:rawable::ConstAttributeFunctor const &)const " (?supports@Text@osgText@@UBE_NABVConstAttributeFunctor@Drawable@osg@@@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall osgText::Text::supports(class osg::Drawable::AttributeFunctor const &)const " (?supports@Text@osgText@@UBE_NABVAttributeFunctor@Drawable@osg@@@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall osgText::Text::accept(class osg::PrimitiveFunctor &)const " (?accept@Text@osgText@@UBEXAAVPrimitiveFunctor@osg@@@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall osgText::Text::accept(class osg::Drawable::ConstAttributeFunctor &)const " (?accept@Text@osgText@@UBEXAAVConstAttributeFunctor@Drawable@osg@@@Z)
1>main.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall osgText::Text::computePositions(unsigned int)const " (?computePositions@Text@osgText@@MBEXI@Z)
1>main.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall osgText::Text::computeGlyphRepresentation(void)" (?computeGlyphRepresentation@Text@osgText@@MAEXXZ)
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) protected: virtual __thiscall osgText::Text::~Text(void)" (__imp_??1Text@osgText@@MAE@XZ) referenced in function "protected: virtual void * __thiscall osgText::Text::`scalar deleting destructor'(unsigned int)" (??_GText@osgText@@MAEPAXI@Z) |
|