|
From: | Novice Programmer |
Subject: | Re: [ft-devel] Problems compiling Freetype |
Date: | Mon, 12 May 2008 17:06:36 +0530 |
Hello Werner,
I got thro this one... how i got thro this is a bit interesting... i installed linux on my system and it worked on linux, then i copied the dito environment variables from linux to ming on windows and it worked.. :). But now i have another issue. I have placed libfreetype.a in the /usr/lib. when i compile a test program, i get the following errors.
Program:
#define HAVE_FT2BUILD_H
#ifdef HAVE_FT2BUILD_H
#include <ft2build.h>
#include FT_FREETYPE_H
#include FT_GLYPH_H
#include FT_SIZES_H
#include FT_SFNT_NAMES_H
#include FT_TRUETYPE_IDS_H
#include FT_OUTLINE_H
#else
#include <freetype/freetype.h>
#include <freetype/ftglyph.h>
#include <freetype/ftsizes.h>
#include <freetype/ftsnames.h>
#include <freetype/ttnameid.h>
#include <freetype/ftoutln.h>
#endif
int main()
{
FT_Library ftlibrary;
FT_Face face;
FT_Error error;
FT_ULong charcode;
FT_UInt gindex;
FT_Glyph glyph;
FT_BBox bbox;
FT_Matrix matrix;
FT_UInt i;
char* name = 0;
char italic, bold;
FT_Init_FreeType(&ftlibrary);
FT_New_Face(ftlibrary, "filename", 0, &face);
i = face->num_glyphs - 1;
italic = face->style_flags&FT_STYLE_FLAG_ITALIC;
bold = face->style_flags&FT_STYLE_FLAG_BOLD;
FT_Get_Postscript_Name(face);
FT_Get_Char_Index(face, 33);
FT_Get_First_Char(face, &i);
FT_Get_Next_Char(face, 33, &i);
if(FT_HAS_GLYPH_NAMES(face)) {
FT_Get_Glyph_Name(face, 33, name, 127);
}
FT_Load_Glyph(face, 33, FT_LOAD_NO_BITMAP|FT_LOAD_NO_SCALE);
FT_Get_Glyph(face->glyph, &glyph);
FT_Glyph_Get_CBox(glyph, ft_glyph_bbox_unscaled, &bbox);
FT_Done_Glyph(glyph);
FT_Done_Face(face);
FT_Done_FreeType(ftlibrary);
return 0;
}
Errors :
freetype.m4:71: gcc -I/gw32/include -I/gw32/include/freetype2/freetype -I/fc/include/fontconfig -I/mingw/include/lame -IC:/gnuwin32/include/freetype2 -IC:/gnuwin32/include -Wparentheses -Wimplicit -Wreturn-type -O -fomit-frame-pointer conftest.c -L/gw32/lib -L/fc/lib -lungif -lt1 -ljpeg -lz -lm -lws2_32 -lgdi32 -LC:/gnuwin32/lib -LC:/gnuwin32/lib -lfreetype -lz -Wl,-s -LD:/Progra~1/GnuWin32/lib -lintl -lwsock32 -lole32 -luuid -lmsvcp60 -o conftest.exe
C:/DOCUME~1/ishu/LOCALS~1/Temp/cc8uJhA6.o:conftest.c:(.text+0x1d): undefined reference to `_imp__FT_Init_FreeType'
C:/DOCUME~1/ishu/LOCALS~1/Temp/cc8uJhA6.o:conftest.c:(.text+0x42): undefined reference to `_imp__FT_New_Face'
C:/DOCUME~1/ishu/LOCALS~1/Temp/cc8uJhA6.o:conftest.c:(.text+0x59): undefined reference to `_imp__FT_Get_Postscript_Name'
C:/DOCUME~1/ishu/LOCALS~1/Temp/cc8uJhA6.o:conftest.c:(.text+0x6e): undefined reference to `_imp__FT_Get_Char_Index'
C:/DOCUME~1/ishu/LOCALS~1/Temp/cc8uJhA6.o:conftest.c:(.text+0x83): undefined reference to `_imp__FT_Get_First_Char'
C:/DOCUME~1/ishu/LOCALS~1/Temp/cc8uJhA6.o:conftest.c:(.text+0x9c): undefined reference to `_imp__FT_Get_Next_Char'
C:/DOCUME~1/ishu/LOCALS~1/Temp/cc8uJhA6.o:conftest.c:(.text+0xc7): undefined reference to `_imp__FT_Get_Glyph_Name'
C:/DOCUME~1/ishu/LOCALS~1/Temp/cc8uJhA6.o:conftest.c:(.text+0xe4): undefined reference to `_imp__FT_Load_Glyph'
C:/DOCUME~1/ishu/LOCALS~1/Temp/cc8uJhA6.o:conftest.c:(.text+0xfc): undefined reference to `_imp__FT_Get_Glyph'
C:/DOCUME~1/ishu/LOCALS~1/Temp/cc8uJhA6.o:conftest.c:(.text+0x119): undefined reference to `_imp__FT_Glyph_Get_CBox'
C:/DOCUME~1/ishu/LOCALS~1/Temp/cc8uJhA6.o:conftest.c:(.text+0x126): undefined reference to `_imp__FT_Done_Glyph'
C:/DOCUME~1/ishu/LOCALS~1/Temp/cc8uJhA6.o:conftest.c:(.text+0x133): undefined reference to `_imp__FT_Done_Face'
C:/DOCUME~1/ishu/LOCALS~1/Temp/cc8uJhA6.o:conftest.c:(.text+0x140): undefined reference to `_imp__FT_Done_FreeType'
Isn't freetype getting linked?
Thanks.
On Mon, May 12, 2008 at 1:10 AM, Werner LEMBERG <address@hidden> wrote:
Thanks. Three things:
> Please find the configure and the make logs attached.
. You haven't sent the `config.log' file (which the configure script
directly generates).
. The stdout/stderr log is incomplete; it only shows the linking but
not the generation of the object files.
. I've no idea about mingw32, but creation of `libfreetype.dll.a'
looks strange. This should be `libfreetype.dll', right?
BTW, please send such big files always compressed since it makes the
mails *much* smaller.
Werner
[Prev in Thread] | Current Thread | [Next in Thread] |