金曜日, 2月 09, 2007

FTGL on MinGW

積み残していたFTGLですが、ふつーにconfigureを動かしても--with-gl-libで指定しても、ライブラリ名を変更してみてもconfigureがGLのライブラリを見付けてくれない。でAutoconfに潜ろうかと思うも、根がぐうたらなねこさんなのでいにしえの小手先テクに逃げてしまおうと
g++ -I..\include -Ic:\mingw\local\include -Ic:\mingw\local\include\freetype2 -O3 -c FTBitmapGlyph.cpp g++ -I..\include -Ic:\mingw\local\include -Ic:\mingw\local\include\freetype2 -O3 -c FTCharmap.cpp g++ -I..\include -Ic:\mingw\local\include -Ic:\mingw\local\include\freetype2 -O3 -c FTContour.cpp g++ -I..\include -Ic:\mingw\local\include -Ic:\mingw\local\include\freetype2 -O3 -c FTExtrdGlyph.cpp g++ -I..\include -Ic:\mingw\local\include -Ic:\mingw\local\include\freetype2 -O3 -c FTFace.cpp g++ -I..\include -Ic:\mingw\local\include -Ic:\mingw\local\include\freetype2 -O3 -c FTFont.cpp g++ -I..\include -Ic:\mingw\local\include -Ic:\mingw\local\include\freetype2 -O3 -c FTGLBitmapFont.cpp g++ -I..\include -Ic:\mingw\local\include -Ic:\mingw\local\include\freetype2 -O3 -c FTGLExtrdFont.cpp g++ -I..\include -Ic:\mingw\local\include -Ic:\mingw\local\include\freetype2 -O3 -c FTGLOutlineFont.cpp g++ -I..\include -Ic:\mingw\local\include -Ic:\mingw\local\include\freetype2 -O3 -c FTGLPixmapFont.cpp g++ -I..\include -Ic:\mingw\local\include -Ic:\mingw\local\include\freetype2 -O3 -c FTGLPolygonFont.cpp g++ -I..\include -Ic:\mingw\local\include -Ic:\mingw\local\include\freetype2 -O3 -c FTGLTextureFont.cpp g++ -I..\include -Ic:\mingw\local\include -Ic:\mingw\local\include\freetype2 -O3 -c FTGlyph.cpp g++ -I..\include -Ic:\mingw\local\include -Ic:\mingw\local\include\freetype2 -O3 -c FTGlyphContainer.cpp g++ -I..\include -Ic:\mingw\local\include -Ic:\mingw\local\include\freetype2 -O3 -c FTLibrary.cpp g++ -I..\include -Ic:\mingw\local\include -Ic:\mingw\local\include\freetype2 -O3 -c FTOutlineGlyph.cpp g++ -I..\include -Ic:\mingw\local\include -Ic:\mingw\local\include\freetype2 -O3 -c FTPixmapGlyph.cpp g++ -I..\include -Ic:\mingw\local\include -Ic:\mingw\local\include\freetype2 -O3 -c FTPoint.cpp g++ -I..\include -Ic:\mingw\local\include -Ic:\mingw\local\include\freetype2 -O3 -c FTPolyGlyph.cpp g++ -I..\include -Ic:\mingw\local\include -Ic:\mingw\local\include\freetype2 -O3 -c FTSize.cpp g++ -I..\include -Ic:\mingw\local\include -Ic:\mingw\local\include\freetype2 -O3 -c FTTextureGlyph.cpp g++ -I..\include -Ic:\mingw\local\include -Ic:\mingw\local\include\freetype2 -O3 -c FTVectoriser.cpp ar -r libftgl.a *.o ranlib libftgl.a ってバッチファイルを作成して(もちろんぐうたらなので手で書いたりはしません)実行。
nekosan> g++ -mwindows -DFREEGLUT_STATIC -I..\include -I\mingw\local\include -I\mingw\local\include\freetype2 -O3 -o FTGLDemo.exe FTGLDemo.cpp tb.c trackball.c -L\mingw\local\lib -L..\src -lftgl -lfreetype -lglut32 -lglu32 -lopengl32 -lwinmm -lgdi32 てな感じで動作確認、そうそうXPで動かすときはフォントパスを
#define FONT_FILE "C:\\WINDOWS\\Fonts\\arial.ttf" 変更するのを忘れずに。

0 件のコメント: