[ft-devel] Follow up: FreeType v2501 under DJGPP with RHIDE
From:
Daniel Nice
Subject:
[ft-devel] Follow up: FreeType v2501 under DJGPP with RHIDE
Date:
Tue, 13 Jan 2015 15:55:32 -0500
I am trying to set up FreeType v2.51 with DJGPP under RHIDE on DOS in order to trace through the library source code.
Particularly, I want to translate the anti-aliased rasterizer to another language.
Therefore, I do not want to build the library -- I want all source code to be traceable.
On further investigation, it appears many of the problems in my prior post getting the official demo running were due to the lack of a DOS version of the graphics library.
I have now switched to a more simple test program which displays FreeType output to the console using plain ASCII.
This has reduced my errors down to the following (DJGPP under RHIDE on DOS):
--------------------------------------------------------------
Error: ftinit.o:ftinit.c:(.text+0x0): undefined reference to `_autofit_module_class'
Error: ftinit.o:ftinit.c:(.text+0x8): undefined reference to `_t1_driver_class'
Error: ftinit.o:ftinit.c:(.text+0xc): undefined reference to `_cff_driver_class'
Error: ftinit.o:ftinit.c:(.text+0x10): undefined reference to `_t1cid_driver_class'
Error: ftinit.o:ftinit.c:(.text+0x14): undefined reference to `_pfr_driver_class'
Error: ftinit.o:ftinit.c:(.text+0x18): undefined reference to `_t42_driver_class'
Error: ftinit.o:ftinit.c:(.text+0x1c): undefined reference to `_winfnt_driver_class'
Error: ftinit.o:ftinit.c:(.text+0x20): undefined reference to `_pcf_driver_class'
Error: ftinit.o:ftinit.c:(.text+0x24): undefined reference to `_psaux_module_class'
Error: ftinit.o:ftinit.c:(.text+0x2c): undefined reference to `_pshinter_module_class'
Error: ftinit.o:ftinit.c:(.text+0x44): undefined reference to `_bdf_driver_class'
Error: collect2: ld returned 1 exit status
--------------------------------------------------------------
To get this far, I made a project in RHIDE which includes the following FreeType source files:
common.c
ftbase.c
ftbbox.c
ftbitmap.c
ftdebug.c
ftglyph.c
ftinit.c
ftsystem.c
psnames.c
raster.c
sfnt.c
smooth.c
truetype.c
My demo program, which I believe also came from a FreeType source, is called example1.c and it contains the following:
-----------------------------------------------------------
/* example1.c */
/* */
/* This small program shows how to print a rotated string with the */
/* FreeType 2 library. */
/* the pen position in 26.6 cartesian space coordinates; */
/* start at (300,200) relative to the upper left corner */
pen.x = 300 * 64;
pen.y = ( target_height - 200 ) * 64;
for ( n = 0; n < num_chars; n++ )
{
/* set transformation */
FT_Set_Transform( face, &matrix, &pen );
/* load glyph image into the slot (erase previous one) */
error = FT_Load_Char( face, text[n], FT_LOAD_RENDER );
if ( error )
continue; /* ignore errors */