ページ

2011年9月11日日曜日

osg へ free type の組み込みがうまくできない。。。

前回の投稿であったフォントの不具合を解決するべく、 free type を DL してきました。

こちらはソリューションファイルが提供されていたので、個別にビルドして、CMake への環境変数を以下のように指定して Configure と Generate を実行しました。
FREETYPE_INCLUDE_DIR_freetype2
..../freetype/include/freetype
FREETYPE_INCLUDE_DIR_ft2build
.../freetype/include
FREETYPE_LIBRARY
..../freetype/objs/win32/vc2008
すると CMake に下記のような警告が出てしまいました。
WARNING: Target "osgdb_freetype" requests linking to directory "....\freetype\objs\win32\vc2008".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "osgdb_freetype" requests linking to directory "....\freetype\objs\win32\vc2008".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "osgdb_freetype" requests linking to directory "....\freetype\objs\win32\vc2008".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "osgdb_freetype" requests linking to directory "....\freetype\objs\win32\vc2008".  Targets may link only to libraries.  CMake is dropping the item.
Visual Studio 2008 でビルドしたんですが、Plugins freetype がリンクがうまくいきませんでした。以下がそのリンクエラーです。
>リンクしています...
>FreeTypeFont.obj : error LNK2019: 未解決の外部シンボル _FT_Done_Face が関数 "public: virtual __thiscall FreeTypeFont::~FreeTypeFont(void)" (??1FreeTypeFont@@UAE@XZ) で参照されました。
>FreeTypeFont.obj : error LNK2019: 未解決の外部シンボル _FT_Set_Pixel_Sizes が関数 "protected: void __thiscall FreeTypeFont::init(void)" (?init@FreeTypeFont@@IAEXXZ) で参照されました。
>FreeTypeFont.obj : error LNK2019: 未解決の外部シンボル _FT_Load_Char が関数 "public: virtual class osgText::Glyph * __thiscall FreeTypeFont::getGlyph(struct std::pair const &,unsigned int)" (?getGlyph@FreeTypeFont@@UAEPAVGlyph@osgText@@ABU?$pair@II@std@@I@Z) で参照されました。
>FreeTypeFont.obj : error LNK2019: 未解決の外部シンボル _FT_Outline_Get_BBox が関数 "public: virtual class osgText::Glyph3D * __thiscall FreeTypeFont::getGlyph3D(unsigned int)" (?getGlyph3D@FreeTypeFont@@UAEPAVGlyph3D@osgText@@I@Z) で参照されました。
>FreeTypeFont.obj : error LNK2019: 未解決の外部シンボル _FT_Outline_Decompose が関数 "public: virtual class osgText::Glyph3D * __thiscall FreeTypeFont::getGlyph3D(unsigned int)" (?getGlyph3D@FreeTypeFont@@UAEPAVGlyph3D@osgText@@I@Z) で参照されました。
>FreeTypeFont.obj : error LNK2019: 未解決の外部シンボル _FT_Get_Kerning が関数 "public: virtual class osg::Vec2f __thiscall FreeTypeFont::getKerning(unsigned int,unsigned int,enum osgText::KerningType)" (?getKerning@FreeTypeFont@@UAE?AVVec2f@osg@@IIW4KerningType@osgText@@@Z) で参照されました。
>FreeTypeFont.obj : error LNK2019: 未解決の外部シンボル _FT_Get_Char_Index が関数 "public: virtual class osg::Vec2f __thiscall FreeTypeFont::getKerning(unsigned int,unsigned int,enum osgText::KerningType)" (?getKerning@FreeTypeFont@@UAE?AVVec2f@osg@@IIW4KerningType@osgText@@@Z) で参照されました。
>FreeTypeLibrary.obj : error LNK2019: 未解決の外部シンボル _FT_Init_FreeType が関数 "protected: __thiscall FreeTypeLibrary::FreeTypeLibrary(void)" (??0FreeTypeLibrary@@IAE@XZ) で参照されました。
>FreeTypeLibrary.obj : error LNK2019: 未解決の外部シンボル _FT_Done_FreeType が関数 "public: virtual __thiscall FreeTypeLibrary::~FreeTypeLibrary(void)" (??1FreeTypeLibrary@@UAE@XZ) で参照されました。
>FreeTypeLibrary.obj : error LNK2019: 未解決の外部シンボル _FT_New_Face が関数 "protected: bool __thiscall FreeTypeLibrary::getFace(class std::basic_string,class std::allocator > const &,unsigned int,struct FT_FaceRec_ * &)" (?getFace@FreeTypeLibrary@@IAE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAAPAUFT_FaceRec_@@@Z) で参照されました。
>FreeTypeLibrary.obj : error LNK2019: 未解決の外部シンボル _FT_Open_Face が関数 "protected: unsigned char * __thiscall FreeTypeLibrary::getFace(class std::basic_istream > &,unsigned int,struct FT_FaceRec_ * &)" (?getFace@FreeTypeLibrary@@IAEPAEAAV?$basic_istream@DU?$char_traits@D@std@@@std@@IAAPAUFT_FaceRec_@@@Z) で参照されました。
>FreeTypeLibrary.obj : error LNK2019: 未解決の外部シンボル _FT_Set_Charmap が関数 "protected: void __thiscall FreeTypeLibrary::verifyCharacterMap(struct FT_FaceRec_ *)" (?verifyCharacterMap@FreeTypeLibrary@@IAEXPAUFT_FaceRec_@@@Z) で参照されました。
>....\OpenSceneGraph-3.0.1\bin\osgPlugins-3.0.1\osgdb_freetyped.dll : fatal error LNK1120: 外部参照 12 が未解決です。
どうしたもんでしょうか。。。


今回はこれ位で、次回へ続く。。。

0 件のコメント: