[fpc-pascal] Re: PDFlib TET - convert using h2pas

Ludo Brands ludo.brands at free.fr
Wed May 18 16:51:13 CEST 2011

In this case:
1) because h2pas doesn't use pascal macro's. A construct like
#if defined(WIN32) && !defined(PDFLIB_CALL)
#define PDFLIB_CALL     __cdecl
can not be translated using pascal constants or functions. Cdecl is a
calling convention modifier.
2) afaik pascal doesnt support widestring constants. Therefor h2pas doesn't
#define IFILTER_WCHAR_LONG_VERSIONSTRING	L"4.0p7". In this case, the
string doesn't contain non-ascii characters and pascal will assign (convert)
correctly a ascii string to a widechar string. So you can just solve the
problem by 


-----Message d'origine-----
De : fpc-pascal-bounces at lists.freepascal.org
[mailto:fpc-pascal-bounces at lists.freepascal.org] De la part de Marcos
Envoyé : mercredi 18 mai 2011 16:24
À : FPC-Pascal users discussions
Objet : [fpc-pascal] Re: PDFlib TET - convert using h2pas

On Tue, May 17, 2011 at 5:04 PM, Marcos Douglas <md at delfire.net> wrote:
> Hi,
> I would like to use the TET[1] in FPC on Windows.
> There are 2 options:
> 1- Translate C header to use libtet.dll (I prefer);
> 2- Use the COM object (TET_com.dll);
> I can use COM in Delphi 7 easily. There is a Wizard to translate call 
> from COM object to Object Pascal... But I would like to use FPC!
> Somebody can help me to use h2pas tool to translate the C header in 
> attachment?
> [1] http://www.pdflib.com/download/tet/

At least tell me why h2pas can not parse this header file, please.

Marcos Douglas
fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org

More information about the fpc-pascal mailing list