[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ft-devel] (no subject)
From: |
Patrick Hoffmann |
Subject: |
[ft-devel] (no subject) |
Date: |
Tue, 18 Apr 2006 16:13:16 +0200 |
User-agent: |
Opera M2/8.54 (Win32, build 7730) |
Hi out there ( outside of windows :P ),
I've used your freetype library some years ago for a small emedded
project. It's tiny but works nice. Good job!
Now I think about using your library for a second time. And before I start
to test it in another embedded system, I have to link your lib to a
windows test application. But linking your stuff is isn't easy and
compiling too. This is why:
When I use the VC++ 7 build file that comes with your library, I can't
link because of some unresolved externals:
my.cpp (ftinit.obj) : error LNK2001: unresolved external symbol
_otv_module_class
my.cpp (ftglyph.obj) : error LNK2019: unresolved external symbol
_FT_Bitmap_Copy referenced in function _ft_bitmap_glyph_init
my.cpp (ftglyph.obj) : error LNK2019: unresolved external symbol
_FT_Bitmap_New referenced in function _ft_bitmap_glyph_init
my.cpp (ftglyph.obj) : error LNK2019: unresolved external symbol
_FT_Bitmap_Done referenced in function _ft_bitmap_glyph_done
adding ftbitmap.c to the project fixed the Bitmap issues. But otv is a
hard nut to crack! I've tried to add otvmod.c to the project, but then I
got some more unresolved externals (one for example):
my.lib(otvmod.obj) : error LNK2019: unresolved external symbol
_otv_JSTF_validate referenced in function _otv_validate
I've added otvjstf.c but then I get the following errors (one for example):
freetype-2.1.10\src\otvalid\otvjstf.c(100) : warning C4003: not enough
actual parameters for macro 'OTV_NEST2_'
freetype-2.1.10\src\otvalid\otvjstf.c(100) : error C2059: syntax error :
';'
The source of this error is (I cut it together):
// used defines
#define JstfMax otv_x_Ox, "JstfMax"
#define JstfLookup otv_GPOS_subtable_validate, ""
#define OTV_NEST2( x, y ) OTV_NEST2_( x, y )
#define OTV_NEST2_( func0, name0, func1, name1 )
// error code
OTV_NEST2( JstfMax, JstfLookup );
So the problem is that the preprocessor of my compiler tries to check the
number of parameters of each macro call. And it collapses when you guys
are juggling with your macro's parameters. For example: OTV_NEST2 gets two
parameters. Each of them gets two parameters in one (e.g. JstfMax
otv_x_Ox, "JstfMax"). And like if this isn't enough you follow these weird
parameters to another macro called OTV_NEST2_ that takes 4 parameters.
Ok, maybe baby! If I would have written a C compiler, it surely would eat
this code like I would eat vanilla ice cream :P. But I'm not sure about
the "microcodies" at microsoft!
This e-mail is just to let you know that you have left the path of
portable code (since some versions). I would suggest you to forbear to
give more and more code to the preprocessor instead to the compiler.
You're escaping C! ;)
If you can show me the line in the C Standard that is about this
preprocessor behaviour, I'll follow up this message to microsoft. But if
you can't, please fix that code!
Thanx!
--
Mit freundlichen Grüßen,
Patrick Hoffmann
PGP Public Key: www.patsite.de/ph.asc
Auszug aus einem Chatgespräch:
<FraggD13B> Es gibt ein Leben außerhalb des Internets...!!!
<XS1CHT> wtf?
<XS1CHT> Link?
- [ft-devel] (no subject),
Patrick Hoffmann <=