私はので、このコードを始めるために私に容易になるので、これまでのところ、私はprcompiledライブラリーを得たのOpenGLアプリケーションに出力テキストには、このライブラリを使用しようとしていた:私はコンパイルしないのであればFTGL未定義の参照はすべてですか?
#include <SDL/SDL_opengl.h>
#include <FTGL/ftgl.h>
...
...
int main(int argc, char* args[])
{
...
...
//Y U NO WORK!
FTGLPixmapFont font("ariblk.ttf");
if(font.Error())
...
...
SDL_Quit();
return 0;
}
をこのリンカーを有するそれは:私は2 REMが含まれている場合、右の原因をIDKリンカーを置くことを忘れてしまった原因
OPENGL ETC\SDLOPENGL\main.cpp|108|undefined reference to `FTPixmapFont::FTPixmapFont(char const*)'|
OPENGL ETC\SDLOPENGL\main.cpp|109|undefined reference to `FTFont::Error() const'|
OPENGL ETC\SDLOPENGL\main.cpp|303|undefined reference to `FTPixmapFont::~FTPixmapFont()'|
OPENGL ETC\SDLOPENGL\main.cpp|303|undefined reference to `FTPixmapFont::~FTPixmapFont()'|
||=== Build finished: 4 errors, 0 warnings ===|
は今、これは次のようになります。
-lmingw32 -lSDLmain -lSDL -lopengl32 -lglu32 -lSDL_image -lm -lgdi32 -lsdl_mixer -lSDL_ttf
私はこのエラーを取得しますリンカーをaining:
-lfreetype2 -lftgl
私は私があなたの目の男を破っしたいいけないイムは、ここでそれらを置くつもりはないエラーの50のように取得します。
これを修正するために何が問題になる可能性がありますか?
IDE:Windowsの
EDIT: OSのコードブロック
||=== SDL, Debug ===|
int)]+0x12)||undefined reference to `[email protected]'|
int)]+0x21)||undefined reference to `[email protected]'|
int)]+0x30)||undefined reference to `[email protected]'|
int)]+0x47)||undefined reference to `[email protected]'|
int)]+0x6c)||undefined reference to `[email protected]'|
int)]+0x82)||undefined reference to `[email protected]'|
int)]+0x98)||undefined reference to `[email protected]'|
int)]+0xae)||undefined reference to `[email protected]'|
int)]+0xc4)||undefined reference to `[email protected]'|
int)]+0x147)||undefined reference to `[email protected]'|
int)]+0x14c)||undefined reference to `[email protected]'|
int)]+0x12)||undefined reference to `[email protected]'|
int)]+0x21)||undefined reference to `[email protected]'|
int)]+0x30)||undefined reference to `[email protected]'|
int)]+0x47)||undefined reference to `[email protected]'|
int)]+0x6c)||undefined reference to `[email protected]'|
int)]+0x82)||undefined reference to `[email protected]'|
int)]+0x98)||undefined reference to `[email protected]'|
int)]+0xae)||undefined reference to `[email protected]'|
int)]+0xc4)||undefined reference to `[email protected]'|
int)]+0x147)||undefined reference to `[email protected]'|
int)]+0x14c)||undefined reference to `[email protected]'|
c:\program
files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\libftgl.a
(FTPixmapGlyph.o):FTPixmapGlyph.cpp|| undefined reference to `[email protected]'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\libftgl.a
(FTPixmapGlyph.o):FTPixmapGlyph.cpp|| undefined reference to `[email protected]'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\libftgl.a
(FTPixmapGlyph.o):FTPixmapGlyph.cpp|| undefined reference to `[email protected]'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\libftgl.a
(FTPixmapGlyph.o):FTPixmapGlyph.cpp|| undefined reference to `[email protected]'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\libftgl.a
(FTPixmapGlyph.o):FTPixmapGlyph.cpp|| undefined reference to `[email protected]'|
||=== Build finished: 27 errors, 0 warnings ===|
EDIT:
はのように思える
だから順序を変更した後、私はまだエラーに
エラーを取得しますそれはあなたのansのためにthx人を動作させません -
-lmingw32 -lSDLmain -lSDL -lSDL_image -lm -lgdi32 -lsdl_mixer -lSDL_ttf -lftgl:右の順だったエラーがまだ
||=== SDL, Debug ===|
c:\program
files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\libftgl.a
(FTPixmapGlyph.o):FTPixmapGlyph.cpp|| undefined reference to `FT_Render_Glyph'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\libftgl.a
(FTPixmapGlyph.o):FTPixmapGlyph.cpp|| undefined reference to `FT_Render_Glyph'|
c:\program
files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\libftgl.a
(FTFace.o):FTFace.cpp|| undefined reference to `FT_New_Face'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\libftgl.a
(FTFace.o):FTFace.cpp|| undefined reference to `FT_New_Face'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\libftgl.a
(FTFace.o):FTFace.cpp|| undefined reference to `FT_New_Memory_Face'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\libftgl.a
(FTFace.o):FTFace.cpp|| undefined reference to `FT_New_Memory_Face'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\libftgl.a
(FTFace.o):FTFace.cpp|| undefined reference to `FT_Done_Face'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\libftgl.a
(FTFace.o):FTFace.cpp|| undefined reference to `FT_Done_Face'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\libftgl.a
(FTFace.o):FTFace.cpp|| undefined reference to `FT_Done_Face'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\libftgl.a
(FTFace.o):FTFace.cpp|| undefined reference to `FT_Attach_File'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\libftgl.a
(FTFace.o):FTFace.cpp|| undefined reference to `FT_Attach_Stream'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\libftgl.a
(FTFace.o):FTFace.cpp|| undefined reference to `FT_Get_Kerning'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\libftgl.a
(FTFace.o):FTFace.cpp|| undefined reference to `FT_Load_Glyph'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\libftgl.a
(FTFace.o):FTFace.cpp|| undefined reference to `FT_Get_Kerning'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\libftgl.a
(FTSize.o):FTSize.cpp|| undefined reference to `FT_Set_Char_Size'|
)]+0x54)||undefined reference to `FT_Outline_Get_CBox'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\libftgl.a
(FTCharmap.o):FTCharmap.cpp|| undefined reference to `FT_Set_Charmap'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\libftgl.a
(FTCharmap.o):FTCharmap.cpp|| undefined reference to `FT_Get_Char_Index'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\libftgl.a
(FTCharmap.o):FTCharmap.cpp|| undefined reference to `FT_Set_Charmap'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\libftgl.a
(FTCharmap.o):FTCharmap.cpp|| undefined reference to `FT_Get_Char_Index'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\libftgl.a
(FTCharmap.o):FTCharmap.cpp|| undefined reference to `FT_Select_Charmap'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\libftgl.a
(FTCharmap.o):FTCharmap.cpp|| undefined reference to `FT_Get_Char_Index'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\libftgl.a
(FTLibrary.o):FTLibrary.cpp|| undefined reference to `FT_Done_FreeType'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\libftgl.a
(FTLibrary.o):FTLibrary.cpp|| undefined reference to `FT_Done_FreeType'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\libftgl.a
(FTLibrary.o):FTLibrary.cpp|| undefined reference to `FT_Init_FreeType'|
||=== Build finished: 25 errors, 0 warnings ===|
LAST UPDATE
言っcasualcoder行った後、今wers lfreetype2 -lopengl32 -lglu32
あなたはfreetype2' 'に対するリンク後取得エラーを添付しなければなりませんあなたが 'freetype2'とリンクしていないので、リンクエラーです。 –
ftglライブラリをリンクする必要があります。使用するオーダーの代わりに-lftgl -lfreetype2を使用するとどうなりますか。それが動作しない場合、出力の5行を投稿してください。 – casualcoder
パラパラが正しいです。 2番目のエラーのセットが長くても、自分の_real_の問題ではありません。 –