freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: adding a couple of lines to freetype/freetype.h


From: David Somers
Subject: Re: adding a couple of lines to freetype/freetype.h
Date: Mon, 25 Sep 2000 15:29:29 +0200

Hoi Bart,

These extensions appear to be for a specific compiler under windows, and not
*all* compilers for windows... so, if these are going to be included, please
wrap them with a compiler specific check... for example, in my client
programs I do:

#if defined(_MSC_VER)
  #if defined(_DEBUG)
    #pragma comment (lib, "../redist/libZEBs_D.lib")
  #else
    #pragma comment (lib, "../redist/libZEBs.lib")
  #endif
#endif

to wrap some MSVC specific directives to set the libraries to link with.

Also, be careful of mentioning StdAfx.h. Don't assume that everybody uses
precompiled headers; I don't.

BTW, unless I'm misunderstanding something, you are pulling in the same
freetype library regardless of whether its for a release or debug build. One
thing that I do is to build both release and debug libraries but with
different names, and pull them in as appropriate to my release or debug
client apps... from experience, mixing debug and release objects and
libraries is only asking for trouble.

Cheers from (warm and sunny) Luxembourg,

David.

----- Original Message -----
From: Bart De Lathouwer
To: address@hidden
Sent: Monday, September 25, 2000 13:55
Subject: RFC: adding a couple of lines to freetype/freetype.h


Hi FreeType dev team

Can I suggest to add the following lines to freetype/freetype.h
This makes the life of some window programmers more easy. It
automatically links in the correct library depending on the settings
for the project. In StdAfx.h one must only include freetype/freetype.h.

For my projects i must also include freetype/ftglyph.h,
are other users including this file as well? If so, it might
come in handy to include it also in freetype/freetype.h

Cheers
Bart De Lathouwer



Here the code (inserted at line 45)

// BDL Start modif
// BDL Awaiting approval from FreeType team.
#include <freetype/ftglyph.h>

#ifdef WIN32
 // BDL Awaiting approval from FreeType team.
 #ifdef _DEBUG
  // BDL If different from release
  #define _FTX_COMMENT "freetype2.8.lib"
  #define _FTX_MESSAGE "Automatically linking with freetype2.8.lib"
 #else
  #define _FTX_COMMENT "freetype2.8.lib"
  #define _FTX_MESSAGE "Automatically linking with freetype2.8.lib"
 #endif

 #pragma comment(lib, _FTX_COMMENT)
 #pragma message(_FTX_MESSAGE)
#endif
// BDL End modif




reply via email to

[Prev in Thread] Current Thread [Next in Thread]